Merge pull request #3180 from vieux/job_container_delete

Move container_delete to job
Upstream-commit: 6dde20c0c517833224689c0eff2d247910a7083b
Component: engine
This commit is contained in:
Victor Vieux
2014-01-10 15:53:38 -08:00
3 changed files with 50 additions and 31 deletions

View File

@ -95,7 +95,9 @@ func TestCreateRm(t *testing.T) {
t.Errorf("Expected 1 container, %v found", len(c))
}
if err = srv.ContainerDestroy(id, true, false); err != nil {
job := eng.Job("container_delete", id)
job.SetenvBool("removeVolume", true)
if err := job.Run(); err != nil {
t.Fatal(err)
}
@ -135,7 +137,9 @@ func TestCreateRmVolumes(t *testing.T) {
t.Fatal(err)
}
if err = srv.ContainerDestroy(id, true, false); err != nil {
job = eng.Job("container_delete", id)
job.SetenvBool("removeVolume", true)
if err := job.Run(); err != nil {
t.Fatal(err)
}
@ -213,7 +217,9 @@ func TestCreateStartRestartStopStartKillRm(t *testing.T) {
}
// FIXME: this failed once with a race condition ("Unable to remove filesystem for xxx: directory not empty")
if err := srv.ContainerDestroy(id, true, false); err != nil {
job = eng.Job("container_delete", id)
job.SetenvBool("removeVolume", true)
if err := job.Run(); err != nil {
t.Fatal(err)
}