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

Move expose 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:23:46 +04:00
committed by Alexandr Morozov
parent c58991f31a
commit 81d1641139
2 changed files with 15 additions and 15 deletions

View File

@ -525,6 +525,21 @@ func TestBuildCmd(t *testing.T) {
logDone("build - cmd") logDone("build - cmd")
} }
func TestBuildExpose(t *testing.T) {
checkSimpleBuild(t,
`
FROM scratch
EXPOSE 4243
`,
"testbuildimg",
"{{json .config.ExposedPorts}}",
`{"4243/tcp":{}}`)
deleteImages("testbuildimg")
logDone("build - expose")
}
// TODO: TestCaching // TODO: TestCaching
// TODO: TestADDCacheInvalidation // TODO: TestADDCacheInvalidation

View File

@ -414,21 +414,6 @@ func buildImage(context testContextTemplate, t *testing.T, eng *engine.Engine, u
return image, err return image, err
} }
func TestBuildExpose(t *testing.T) {
img, err := buildImage(testContextTemplate{`
from {IMAGE}
expose 4243
`,
nil, nil}, t, nil, true)
if err != nil {
t.Fatal(err)
}
if _, exists := img.Config.ExposedPorts[nat.NewPort("tcp", "4243")]; !exists {
t.Fail()
}
}
func TestBuildEntrypoint(t *testing.T) { func TestBuildEntrypoint(t *testing.T) {
img, err := buildImage(testContextTemplate{` img, err := buildImage(testContextTemplate{`
from {IMAGE} from {IMAGE}