mirror of https://github.com/docker/docs.git
add cleanupin tests to remove leftover containers
This commit is contained in:
parent
0ca533ca35
commit
f854529ae8
|
@ -94,6 +94,13 @@ func init() {
|
||||||
globalRuntime = runtime
|
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"
|
// Create the "Server"
|
||||||
srv := &Server{
|
srv := &Server{
|
||||||
runtime: globalRuntime,
|
runtime: globalRuntime,
|
||||||
|
|
Loading…
Reference in New Issue