mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
cleanup test wrong key.json leading to other failures
wait for container to be running before trying to kill it in daemon tests Signed-off-by: Jessica Frazelle <jess@docker.com>
This commit is contained in:
parent
7ecf4e5d4d
commit
9a87553e4f
1 changed files with 2 additions and 3 deletions
|
@ -881,13 +881,12 @@ func TestDaemonwithwrongkey(t *testing.T) {
|
|||
}
|
||||
|
||||
d1 := NewDaemon(t)
|
||||
defer os.Remove("/etc/docker/key.json")
|
||||
|
||||
if err := d1.Start(); err == nil {
|
||||
d1.Stop()
|
||||
os.Remove("/etc/docker/key.json")
|
||||
t.Fatalf("It should not be succssful to start daemon with wrong key: %v", err)
|
||||
}
|
||||
os.Remove("/etc/docker/key.json")
|
||||
|
||||
content, _ := ioutil.ReadFile(d1.logFile.Name())
|
||||
|
||||
|
@ -905,7 +904,7 @@ func TestDaemonRestartKillWait(t *testing.T) {
|
|||
}
|
||||
defer d.Stop()
|
||||
|
||||
out, err := d.Cmd("run", "-d", "busybox", "/bin/cat")
|
||||
out, err := d.Cmd("run", "-id", "busybox", "/bin/cat")
|
||||
if err != nil {
|
||||
t.Fatalf("Could not run /bin/cat: err=%v\n%s", err, out)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue