diff options
author | Brian Goff <cpuguy83@gmail.com> | 2020-12-19 22:04:06 +0000 |
---|---|---|
committer | Tibor Vass <tibor@docker.com> | 2020-12-23 16:59:03 +0000 |
commit | 4a175fd0509f226064003b39f212be7d4c410cf8 (patch) | |
tree | dbaea93b6daadca0559393507d4a6575a3ee33a8 /testutil | |
parent | af0665861bcf6ba67d1e2e07755f9140c64ac468 (diff) |
Cleanup container shutdown check and add test
Adds a test case for the case where dockerd gets stuck on startup due to
hanging `daemon.shutdownContainer`
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Diffstat (limited to 'testutil')
-rw-r--r-- | testutil/daemon/daemon.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testutil/daemon/daemon.go b/testutil/daemon/daemon.go index 1b29654f6c..52882e4dcb 100644 --- a/testutil/daemon/daemon.go +++ b/testutil/daemon/daemon.go @@ -288,6 +288,7 @@ func (d *Daemon) Cleanup(t testing.TB) { func (d *Daemon) Start(t testing.TB, args ...string) { t.Helper() if err := d.StartWithError(args...); err != nil { + d.DumpStackAndQuit() // in case the daemon is stuck t.Fatalf("[%s] failed to start daemon with arguments %v : %v", d.id, d.args, err) } } |