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 (43 lines) | stat: -rw-r--r-- 1,558 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
summary: Ensure that replacing a bind with a symlink doesn't break an update

details: |
    Recently, the steam snap replaced several bindings with symlinks in the
    layout part, and that resulted in users not being able to update it from
    the "bound" version to the "symlinked" one because snapd complained that
    it couldn't update the mount namespace. The solution consists on discard
    the namespace and retry again.

systems:
    # the snaps aren't available for ARM.
    - -ubuntu-*-arm*

prepare: |
    echo "Removing snaps"
    snap remove --purge test-snapd-layout-change || true
    snap remove --purge test-snapd-layout-change-with-daemon || true

restore: |
    echo "Removing snaps"
    snap remove --purge test-snapd-layout-change || true
    snap remove --purge test-snapd-layout-change-with-daemon || true

execute: |
    echo "Testing layout change"

    echo "Installing test snap"
    snap install --beta test-snapd-layout-change

    echo "Refreshing test snap to newer version "
    snap refresh --edge test-snapd-layout-change

    echo "Testing layout change with a daemon"

    echo "Installing test snap with daemon"
    snap install --beta test-snapd-layout-change-with-daemon

    echo "Refreshing test snap with daemon to newer version"
    echo "(this one must fail because daemon snaps can't discard the namespace)"
    if snap refresh --edge test-snapd-layout-change-with-daemon ; then
        echo "ERROR: running snap refresh for test-snapd-layout-change-with-daemon did not fail as expected"
        exit 1
    fi