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:
Chen Hanxiao 2015-02-08 07:04:22 +08:00
Родитель 2706426434
Коммит 0552f1a0ca
1 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -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"