1
0
mirror of https://github.com/moby/moby.git synced 2025-12-24 13:21:20 +03:00

move container_delete to job

handle error

remove useless errStr

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor@docker.com> (github: vieux)
This commit is contained in:
Victor Vieux
2013-12-11 15:23:38 -08:00
committed by Victor Vieux
parent 4e414f6205
commit aa3339cf39
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)
}
@@ -211,7 +215,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)
}