add cleanupin tests to remove leftover containers

Upstream-commit: f854529ae8c9e0139e9ca0466c597b133e3bf41e
Component: engine
This commit is contained in:
Victor Vieux
2013-10-16 18:06:37 +00:00
parent 6de222a908
commit c27a5b0233
+7
View File
@@ -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,