Move cmd build test to integration-cli

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
LK4D4 2014-05-26 23:15:40 +04:00 committed by Alexandr Morozov
parent b05be686ec
commit c58991f31a
2 changed files with 14 additions and 20 deletions

View File

@ -511,6 +511,20 @@ func TestBuildEnv(t *testing.T) {
logDone("build - env")
}
func TestBuildCmd(t *testing.T) {
checkSimpleBuild(t,
`
FROM scratch
CMD ["/bin/echo", "Hello World"]
`,
"testbuildimg",
"{{json .config.Cmd}}",
`["/bin/echo","Hello World"]`)
deleteImages("testbuildimg")
logDone("build - cmd")
}
// TODO: TestCaching
// TODO: TestADDCacheInvalidation

View File

@ -414,26 +414,6 @@ func buildImage(context testContextTemplate, t *testing.T, eng *engine.Engine, u
return image, err
}
func TestBuildCmd(t *testing.T) {
img, err := buildImage(testContextTemplate{`
from {IMAGE}
cmd ["/bin/echo", "Hello World"]
`,
nil, nil}, t, nil, true)
if err != nil {
t.Fatal(err)
}
if img.Config.Cmd[0] != "/bin/echo" {
t.Log(img.Config.Cmd[0])
t.Fail()
}
if img.Config.Cmd[1] != "Hello World" {
t.Log(img.Config.Cmd[1])
t.Fail()
}
}
func TestBuildExpose(t *testing.T) {
img, err := buildImage(testContextTemplate{`
from {IMAGE}