mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 20:51:44 +00:00
add cleanupin tests 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