1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
summary: Check that a snap with base "none" can be installed
details: |
Verify it is not possible to pack a snap with base "none",
also it is not possible install a snap with base "none" which
was manually generated
execute: |
echo "Install a snap with 'base: none'"
snap pack test-snapd-base-none
snap install --dangerous test-snapd-base-none_1.0_all.snap
snap info --verbose test-snapd-base-none | MATCH "^base: .*none"
snap list | MATCH test-snapd-base-none
echo "Snap with base: none and apps is rejected"
snap pack test-snapd-base-none-invalid 2>&1 | MATCH "cannot pack .* cannot validate snap \"test-snapd-base-none\".* cannot have apps or hooks with base \"none\".*"
echo "Creating and installing an invalid snap"
# we cannot use snap pack, create snap manually
mksquashfs test-snapd-base-none-invalid test-snapd-base-none-invalid_x1.snap -comp xz -no-fragments -no-progress
snap install --dangerous test-snapd-base-none-invalid_x1.snap 2>&1 | MATCH "error: cannot read snap file: cannot have apps or hooks with base \"none\""
|