mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
24 lines
640 B
YAML
24 lines
640 B
YAML
summary: Check remove command errors
|
|
|
|
execute: |
|
|
#shellcheck source=tests/lib/names.sh
|
|
. "$TESTSLIB/names.sh"
|
|
|
|
BASE_SNAP=core
|
|
TARGET_SNAP=test-snapd-tools
|
|
if os.query is-core18; then
|
|
BASE_SNAP=core18
|
|
TARGET_SNAP=test-snapd-tools-core18
|
|
fi
|
|
|
|
echo "Given a base snap, $BASE_SNAP, is installed"
|
|
"$TESTSTOOLS"/snaps-state install-local "$TARGET_SNAP"
|
|
|
|
echo "Ensure the important snaps can not be removed"
|
|
for sn in $BASE_SNAP $kernel_name $gadget_name; do
|
|
if snap remove "$sn"; then
|
|
echo "It should not be possible to remove $sn"
|
|
exit 1
|
|
fi
|
|
done
|