1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
summary: Check that refresh from classic->strict works
details: |
Check that a snap can be refreshed from a revision with classic
confinement to a revision with strict confinement.
# ubuntu-core does not support classic confinement
systems: [-ubuntu-core-*]
prepare: |
case "$SPREAD_SYSTEM" in
fedora-*|arch-*|centos-*)
# although classic snaps do not work out of the box on fedora,
# we still want to verify if the basics do work if the user
# symlinks /snap to $SNAP_MOUNT_DIR themselves
SNAP_MOUNT_DIR="$(os.paths snap-mount-dir)"
ln -sf "$SNAP_MOUNT_DIR" /snap
;;
esac
restore: |
case "$SPREAD_SYSTEM" in
fedora-*|arch-*|centos-*)
rm -f /snap
;;
esac
execute: |
echo "Install a snap that needs classic confinement"
snap install --classic --edge test-snapd-classic-confinement
snap list test-snapd-classic-confinement | MATCH '2.0\+fake1'
echo "Now switch to candidate that is strictly confined"
snap switch --candidate test-snapd-classic-confinement
echo "And validate that a refresh will go from classic->strict"
snap refresh
echo "Validate we got the new version"
snap list test-snapd-classic-confinement | MATCH '2.0\+now-strict'
|