mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
Move TestBuildFailsDockerfileEmpty to integration-cli
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
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