1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-06 22:46:47 +00:00

wait for docker container removal

这个提交包含在:
zyx
2020-06-03 19:47:14 +08:00
父节点 a8a35fc259
当前提交 85ce9c1270
共有 2 个文件被更改,包括 36 次插入7 次删除

查看文件

@@ -94,22 +94,27 @@ sleep 20
}
exitedErr <- err
}()
cmdRun("ps", []string{"aux"})
// Wait for docker running
time.Sleep(8 * time.Second)
cmdRun("ps", []string{"aux"})
for wait := 0; wait < 8; wait++ {
names, err := getDockerByName(d.Name())
So(err, ShouldBeNil)
if names != "" {
break
}
time.Sleep(1 * time.Second)
}
// cmdRun("ps", []string{"aux"})
// assert container running
names, err := getDockerByName(d.Name())
So(err, ShouldBeNil)
// So(names, ShouldEqual, d.Name()+"\n")
So(names, ShouldEqual, d.Name()+"\n")
err = provider.Terminate()
// So(err, ShouldBeNil)
So(err, ShouldBeNil)
cmdRun("ps", []string{"aux"})
// cmdRun("ps", []string{"aux"})
<-exitedErr
// container should be terminated and removed