From f854529ae8c9e0139e9ca0466c597b133e3bf41e Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Wed, 16 Oct 2013 18:06:37 +0000 Subject: [PATCH] add cleanupin tests to remove leftover containers --- runtime_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime_test.go b/runtime_test.go index 93fabb206a..1abbcc51e6 100644 --- a/runtime_test.go +++ b/runtime_test.go @@ -94,6 +94,13 @@ func init() { globalRuntime = runtime } + // Cleanup any leftover container + for _, container := range globalRuntime.List() { + if err := globalRuntime.Destroy(container); err != nil { + log.Fatalf("Error destroying leftover container: %s", err) + } + } + // Create the "Server" srv := &Server{ runtime: globalRuntime,