1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Move TestBuildOnBuildTrigger 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 11:14:45 +04:00
parent 08a10f936b
commit 2629e2ec23
2 changed files with 20 additions and 16 deletions

View File

@ -1287,3 +1287,23 @@ func TestBuildFailsDockerfileEmpty(t *testing.T) {
}
logDone("build - fails with empty dockerfile")
}
func TestBuildOnBuild(t *testing.T) {
name := "testbuildonbuild"
defer deleteImages(name)
_, err := buildImage(name,
`FROM busybox
ONBUILD RUN touch foobar`,
true)
if err != nil {
t.Fatal(err)
}
_, err = buildImage(name,
fmt.Sprintf(`FROM %s
RUN [ -f foobar ]`, name),
true)
if err != nil {
t.Fatal(err)
}
logDone("build - onbuild")
}