File: task.yaml

package info (click to toggle)
snapd 2.72-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,412 kB
  • sloc: sh: 16,506; ansic: 16,211; python: 11,213; makefile: 1,919; exp: 190; awk: 58; xml: 22
file content (23 lines) | stat: -rw-r--r-- 1,101 bytes parent folder | download | duplicates (3)
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\""