mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
add CmdLogs test
This commit is contained in:
parent
1f44fd8624
commit
177a2f5946
1 changed files with 16 additions and 0 deletions
|
@ -645,3 +645,19 @@ func TestRunAutoRemove(t *testing.T) {
|
||||||
t.Fatalf("failed to remove container automatically: container %s still exists", temporaryContainerID)
|
t.Fatalf("failed to remove container automatically: container %s still exists", temporaryContainerID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestCmdLogs(t *testing.T) {
|
||||||
|
cli := NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
||||||
|
defer cleanup(globalRuntime)
|
||||||
|
|
||||||
|
if err := cli.CmdRun(unitTestImageID, "sh", "-c", "ls -l"); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if err := cli.CmdRun("-t", unitTestImageID, "sh", "-c", "ls -l"); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := cli.CmdLogs(globalRuntime.List()[0].ID); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue