1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #12262 from YanFeng-Adam/daemon

A wrong key.json would remain if the TestDaemonwithwrongkey case fails. The issue would lead to failure of other cases.
This commit is contained in:
Evan Hazlett 2015-04-13 16:00:20 -04:00
commit 6b40377c18

View file

@ -884,8 +884,10 @@ func TestDaemonwithwrongkey(t *testing.T) {
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())
@ -893,7 +895,6 @@ func TestDaemonwithwrongkey(t *testing.T) {
t.Fatal("Missing KeyID message from daemon logs")
}
os.Remove("/etc/docker/key.json")
logDone("daemon - it should be failed to start daemon with wrong key")
}