Skip to content

Commit

Permalink
Merge pull request #7155 from zyga/fix/leaky-test-iii
Browse files Browse the repository at this point in the history
tests: remove locally installed core in more tests
  • Loading branch information
zyga authored Jul 25, 2019
2 parents c7f8c5e + f8a0f96 commit 31b12f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/main/snapd-reexec/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ systems: [-ubuntu-core-*, -fedora-*, -opensuse-*, -arch-*, -amazon-*, -centos-*]
restore: |
#shellcheck source=tests/lib/dirs.sh
. "$TESTSLIB"/dirs.sh
# Remove the locale revision of core, if we installed one.
if [ "$(readlink "$SNAP_MOUNT_DIR/core/current")" = x1 ]; then
snap revert core
snap remove --revision=x1 core
fi
# extra cleanup in case something in this test went wrong
rm -f /etc/systemd/system/snapd.service.d/no-reexec.conf
systemctl stop snapd.service snapd.socket
Expand Down
7 changes: 7 additions & 0 deletions tests/main/stale-base-snap/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ prepare: |
restore: |
rm -rf squashfs-root
rm -f core-customized.snap
#shellcheck source=tests/lib/dirs.sh
. "$TESTSLIB"/dirs.sh
# Remove the locale revision of core, if we installed one.
if [ "$(readlink "$SNAP_MOUNT_DIR/core/current")" = x1 ]; then
snap revert core
snap remove --revision=x1 core
fi
execute: |
# Start a "sleep" process in the background
Expand Down

0 comments on commit 31b12f3

Please sign in to comment.