1
0
mirror of https://github.com/docker/cli.git synced 2026-01-25 03:42:05 +03:00
Upstream-commit: 1328be7c299417aa8c8740ac4901a978724afa9b
Component: engine
This commit is contained in:
Victor Vieux
2013-10-03 14:46:07 +00:00
parent 721615e4c7
commit 34abbb9020

View File

@@ -203,6 +203,29 @@ func TestRuntimeCreate(t *testing.T) {
if err == nil {
t.Fatal("Builder.Create should throw an error when Cmd is empty")
}
config := &Config{
Image: GetTestImage(runtime).ID,
Cmd: []string{"/bin/ls"},
PortSpecs: []string{"80"},
}
container, err = runtime.Create(config)
image, err := runtime.Commit(container, "testrepo", "testtag", "", "", config)
if err != nil {
t.Error(err)
}
_, err = runtime.Create(
&Config{
Image: image.ID,
PortSpecs: []string{"80000:80"},
},
)
if err == nil {
t.Fatal("Builder.Create should throw an error when PortSpecs is invalid")
}
}
func TestDestroy(t *testing.T) {