Skip to content

Commit

Permalink
test: Kill podman pause process between tests
Browse files Browse the repository at this point in the history
Working with user podman API leaves behind a `podman pause` process
which is not attached to/stopped by podman.service.

Avoid that leaking into the next test while the data directories get
restored.

See containers/podman#7180
  • Loading branch information
martinpitt committed Aug 1, 2020
1 parent 710692f commit 9a9ab08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/check-application
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class TestApplication(testlib.MachineCase):
# Enable user service as well
self.restore_dir("/home/admin/.local/share/containers")
self.admin_s.execute("systemctl --now --user enable podman.socket")
# HACK: user podman.service leaks a "podman pause" outside of the unit: https://github.com/containers/podman/issues/7180
self.addCleanup(self.admin_s.execute, "pkill -u $USER -e podman; while pgrep -u $USER -a podman; do sleep 1; done")

self.addCleanup(self.admin_s.execute, "podman rm --force --all; systemctl --user stop podman.service podman.socket")

self.allow_journal_messages("/run.*/podman/podman: couldn't connect.*")
Expand Down

0 comments on commit 9a9ab08

Please sign in to comment.