Merge pull request #2244 from dotcloud/add_cleanup_leftover_container_tests
Tests: add cleanup to remove leftover containers
This commit is contained in:
commit
2b92aa71f9
1 changed files with 7 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue