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 41 42 43
|
summary: Check that install/remove of multiple snaps works
details: |
Check that installing multiple snaps and removing them with and without
`--purge` results in snapshots being saved or not, accordingly. Check that
installing a snap with a desktop file creates a corresponding desktop file
and that it's deleted once the snap is removed.
execute: |
echo "Install multiple snaps from the store"
snap install test-snapd-sh test-snapd-control-consumer
snap list | MATCH test-snapd-sh
snap list | MATCH test-snapd-control-consumer
echo "Remove of multiple snaps works with --purge"
snap set core snapshots.automatic.retention=30h
snap remove --purge test-snapd-sh test-snapd-control-consumer
not snap list test-snapd-sh
not snap list test-snapd-control-consumer
echo "No snapshots were created"
snap saved | NOMATCH test-snapd-sh
snap saved | NOMATCH test-snapd-control-consumer
echo "Install multiple snaps from the store again"
snap install test-snapd-sh test-snapd-control-consumer
snap list | MATCH test-snapd-sh
snap list | MATCH test-snapd-control-consumer
echo "Remove of multiple snaps works without --purge"
snap set core snapshots.automatic.retention=30h
snap remove test-snapd-sh test-snapd-control-consumer
not snap list test-snapd-sh
not snap list test-snapd-control-consumer
echo "Snapshots were created"
snap saved | MATCH test-snapd-sh
snap saved | MATCH test-snapd-control-consumer
echo "Installing of a snap with a desktop file creates the desktop file"
"$TESTSTOOLS"/snaps-state install-local basic-desktop
test -e /var/lib/snapd/desktop/applications/basic-desktop_io.snapcraft.echoecho.desktop
echo "Removing a snap with a desktop file removes the desktop file again"
snap remove basic-desktop
not test -e /var/lib/snapd/desktop/applications/basic-desktop_io.snapcraft.echoecho.desktop
|