зеркало из https://github.com/microsoft/docker.git
docker_cli_build_test: add testcase of EXPOSE 5678/UDP
test whether we could use upper case proto in EXPOSE Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
Родитель
2706426434
Коммит
0552f1a0ca
|
@ -2293,6 +2293,27 @@ func TestBuildExposeOrder(t *testing.T) {
|
|||
logDone("build - expose order")
|
||||
}
|
||||
|
||||
func TestBuildExposeUpperCaseProto(t *testing.T) {
|
||||
name := "testbuildexposeuppercaseproto"
|
||||
expected := "map[5678/udp:map[]]"
|
||||
defer deleteImages(name)
|
||||
_, err := buildImage(name,
|
||||
`FROM scratch
|
||||
EXPOSE 5678/UDP`,
|
||||
true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
res, err := inspectField(name, "Config.ExposedPorts")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if res != expected {
|
||||
t.Fatalf("Exposed ports %s, expected %s", res, expected)
|
||||
}
|
||||
logDone("build - expose port with upper case proto")
|
||||
}
|
||||
|
||||
func TestBuildEmptyEntrypointInheritance(t *testing.T) {
|
||||
name := "testbuildentrypointinheritance"
|
||||
name2 := "testbuildentrypointinheritance2"
|
||||
|
|
Загрузка…
Ссылка в новой задаче