mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
Remove PortSpecs from Config
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
This commit is contained in:
@@ -2406,31 +2406,6 @@ func (s *DockerSuite) TestBuildExposeUpperCaseProto(c *check.C) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestBuildExposeHostPort(c *check.C) {
|
||||
// start building docker file with ip:hostPort:containerPort
|
||||
name := "testbuildexpose"
|
||||
expected := "map[5678/tcp:{}]"
|
||||
_, out, err := buildImageWithOut(name,
|
||||
`FROM scratch
|
||||
EXPOSE 192.168.1.2:2375:5678`,
|
||||
true)
|
||||
if err != nil {
|
||||
c.Fatal(err)
|
||||
}
|
||||
|
||||
if !strings.Contains(out, "to map host ports to container ports (ip:hostPort:containerPort) is deprecated.") {
|
||||
c.Fatal("Missing warning message")
|
||||
}
|
||||
|
||||
res, err := inspectField(name, "Config.ExposedPorts")
|
||||
if err != nil {
|
||||
c.Fatal(err)
|
||||
}
|
||||
if res != expected {
|
||||
c.Fatalf("Exposed ports %s, expected %s", res, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestBuildEmptyEntrypointInheritance(c *check.C) {
|
||||
name := "testbuildentrypointinheritance"
|
||||
name2 := "testbuildentrypointinheritance2"
|
||||
|
||||
Reference in New Issue
Block a user