Skip to content

Commit 3abdc1f

Browse files
committed
kill: cleanup container on error
if we don't clean it up, the next test cannot re-use the same container ID and it will fail. Signed-off-by: Giuseppe Scrivano <[email protected]>
1 parent 4db38e4 commit 3abdc1f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

validation/kill/kill.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ func main() {
7070
// KILL MUST be supported and KILL cannot be trapped
7171
err = r.Kill("KILL")
7272
util.WaitingForStatus(*r, util.LifecycleStatusStopped, time.Second*10, time.Second*1)
73+
if err != nil {
74+
//Be sure to not leave the container around
75+
r.Delete()
76+
}
7377
return err
7478
},
7579
}

0 commit comments

Comments
 (0)