1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

Move TestBuildFails to integration-cli

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
Alexandr Morozov
2014-06-17 10:57:32 +04:00
parent f1d7ed35bd
commit d3023f25f5
2 changed files with 17 additions and 20 deletions

View File

@ -1256,3 +1256,20 @@ func TestBuildInheritance(t *testing.T) {
}
logDone("build - inheritance")
}
func TestBuildFails(t *testing.T) {
name := "testbuildfails"
defer deleteImages(name)
_, err := buildImage(name,
`FROM busybox
RUN sh -c "exit 23"`,
true)
if err != nil {
if !strings.Contains(err.Error(), "returned a non-zero code: 23") {
t.Fatalf("Wrong error %v, must be about non-zero code 23", err)
}
} else {
t.Fatal("Error must not be nil")
}
logDone("build - fails")
}