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
|
summary: Check that we can remove core snap on classic systems.
details: |
This test checks that we can remove core snap on classic systems, as long as
snapd is installed as a snap. Classic systems do not have 'base' set in
their model. On UC systems, that would be interpreted as 'core' being the
base. On classic (non-hybrid) systems, that should be interpreted as there
not being a base required.
If snapd is not installed as a snap, then we can't remove the core snap
since it might be providing snapd.
systems: [ubuntu-22.04-64]
execute: |
# ensure snapd snap is installed
snap list snapd
# and so is the core snap
snap list core
# we should be able to remove the core snap, since the snapd snap is
# installed.
snap remove core
# there should be no more snaps, so we can remove snapd
snap remove snapd
# TODO the 'old' snapd keeps running, this should be fixed in snapd snap
systemctl restart snapd
# now install core
snap install --dangerous "$TESTSTMP"/core_snap/core_*.snap
# we should be not able to remove the core snap, since only core snap is
# installed now
not snap remove core
|