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 (28 lines) | stat: -rw-r--r-- 1,252 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
24
25
26
27
28
summary: Ensure that the content default-provider download works

details: |
    Check that a snap with no default-provider in the content interface
    can be refreshed to a new version with default-provider.
    Verify that the default-provider got pulled in during the refresh.

# This test purges the state which causes the device to reinitialize
# with (potentially) a different core snap. Running this on core will
# also trigger a reboot in the middle of the tests because the new
# core will be applied. So skip the test on core devices.
systems: [-ubuntu-core-*]

execute: |
    echo "A snap with no default-provider is installed"
    cp -a "$TESTSLIB"/snaps/test-snapd-content-plug .
    sed -i '/default-provider:/d' test-snapd-content-plug/meta/snap.yaml
    snap pack test-snapd-content-plug
    snap install --dangerous ./test-snapd-content-plug_1.0_all.snap
    if snap list | grep test-snapd-content-slot; then
        echo "test broken: test-snapd-content-slot should not be installed yet"
        exit 1
    fi

    echo "A new default-provider will get pulled in on refresh"
    snap refresh --edge --amend test-snapd-content-plug
    echo "And ensure the default-provider got pulled in"
    snap list | grep test-snapd-content-slot