Skip to content

Commit

Permalink
test/e2e: actually check for cleanup errors
Browse files Browse the repository at this point in the history
We blindy trust these commands to work but as it turns out they do not
under certain circumstances.

The "podman run ipcns ipcmk container test" can be used to fail this
reliably, if a container has dependencies the order of rm --all may
cause it to fail because the contianers are deleted in the wrong order.
This is th eonly one I found so far, adding this will uncover many more
of such problems without proper cleanup we leak processes and ginkgo v2
will block because of them.

Of course this cannot be merged without fixing these issues.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed May 2, 2023
1 parent b9ba850 commit 629a6a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/e2e/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,10 @@ func (p *PodmanTestIntegration) Cleanup() {
rmall := p.Podman([]string{"rm", "-fa", "-t", "0"})
rmall.WaitWithDefaultTimeout()

// make sure to only check exit code after both commands ran otherwise we leak when pod rm fails
Expect(podrm).To(Exit(0))
Expect(rmall).To(Exit(0))

p.StopRemoteService()
// Nuke tempdir
p.removeCache(p.TempDir)
Expand Down

0 comments on commit 629a6a6

Please sign in to comment.