mirror of
https://github.com/docker/cli.git
synced 2026-09-25 17:02:07 -04:00
Move TestBuildFailsDockerfileEmpty to integration-cli
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4) Upstream-commit: 08a10f936b4b5a69d3be6d320499c025a399fddb Component: engine
This commit is contained in:
@@ -1273,3 +1273,17 @@ func TestBuildFails(t *testing.T) {
|
||||
}
|
||||
logDone("build - fails")
|
||||
}
|
||||
|
||||
func TestBuildFailsDockerfileEmpty(t *testing.T) {
|
||||
name := "testbuildfails"
|
||||
defer deleteImages(name)
|
||||
_, err := buildImage(name, ``, true)
|
||||
if err != nil {
|
||||
if !strings.Contains(err.Error(), "Dockerfile cannot be empty") {
|
||||
t.Fatalf("Wrong error %v, must be about empty Dockerfile", err)
|
||||
}
|
||||
} else {
|
||||
t.Fatal("Error must not be nil")
|
||||
}
|
||||
logDone("build - fails with empty dockerfile")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user