mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-22 22:56:17 +00:00
Merge pull request #2244 from dotcloud/add_cleanup_leftover_container_tests
Tests: add cleanup to remove leftover containers
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user