Skip to content

Commit

Permalink
tests: check before removing local core
Browse files Browse the repository at this point in the history
Signed-off-by: Zygmunt Krynicki <[email protected]>
  • Loading branch information
zyga committed Jul 24, 2019
1 parent 3d075f7 commit 21b28db
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/main/snap-userd-reexec/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ execute: |
test -f /usr/share/dbus-1/services/io.snapcraft.Launcher.service
diff -u /usr/share/dbus-1/services/io.snapcraft.Launcher.service.orig /usr/share/dbus-1/services/io.snapcraft.Launcher.service
restore: |
snap revert core
snap remove --revision=x1 core
#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

0 comments on commit 21b28db

Please sign in to comment.