mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-08 15:01:42 +00:00
Move TestBuildOnBuildForbiddenFromTrigger to integration-cli
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
@@ -1324,3 +1324,20 @@ func TestBuildOnBuildForbiddenChained(t *testing.T) {
|
||||
}
|
||||
logDone("build - onbuild forbidden chained")
|
||||
}
|
||||
|
||||
func TestBuildOnBuildForbiddenFrom(t *testing.T) {
|
||||
name := "testbuildonbuildforbiddenfrom"
|
||||
defer deleteImages(name)
|
||||
_, err := buildImage(name,
|
||||
`FROM busybox
|
||||
ONBUILD FROM scratch`,
|
||||
true)
|
||||
if err != nil {
|
||||
if !strings.Contains(err.Error(), "FROM isn't allowed as an ONBUILD trigger") {
|
||||
t.Fatalf("Wrong error %v, must be about FROM forbidden", err)
|
||||
}
|
||||
} else {
|
||||
t.Fatal("Error must not be nil")
|
||||
}
|
||||
logDone("build - onbuild forbidden from")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user