Fix error from daemon no such image even when the image exist

Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
Lei Jitang
2015-03-28 09:07:20 +08:00
parent 789a67e931
commit 013fb87543
6 changed files with 18 additions and 6 deletions
+11
View File
@@ -2990,6 +2990,17 @@ func TestRunModeIpcContainer(t *testing.T) {
logDone("run - ipc container mode")
}
func TestRunModeIpcContainerNotExists(t *testing.T) {
defer deleteAllContainers()
cmd := exec.Command(dockerBinary, "run", "-d", "--ipc", "container:abcd1234", "busybox", "top")
out, _, err := runCommandWithOutput(cmd)
if !strings.Contains(out, "abcd1234") || err == nil {
t.Fatalf("run IPC from a non exists container should with correct error out")
}
logDone("run - ipc from a non exists container failed with correct error out")
}
func TestContainerNetworkMode(t *testing.T) {
defer deleteAllContainers()
testRequires(t, SameHostDaemon)