File: task.yaml

package info (click to toggle)
snapd 2.71-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 79,536 kB
  • sloc: ansic: 16,114; sh: 16,105; python: 9,941; makefile: 1,890; exp: 190; awk: 40; xml: 22
file content (32 lines) | stat: -rw-r--r-- 1,016 bytes parent folder | download
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
summary: Ensure canonical-livepatch snap works

details: |
    Verify the canonical-livepatch can be installed and it
    retrieves its status properly.

# livepatch works only on LTS amd64 systems
systems: [ubuntu-14.04-64, ubuntu-16.04-64, ubuntu-18.04-64, ubuntu-20.04-64, ubuntu-22.04-64]

restore: |
    snap remove --purge canonical-livepatch || true
    if os.query is-trusty || os.query is-xenial || os.query is-bionic; then
        # old systemd is not doing cleanups
        find /sys/fs/cgroup/ -type d -name "snap.*" -prune | while read -r svc; do
             rmdir "$svc" || true
        done
    fi

execute: |
    echo "Ensure canonical-livepatch can be installed"
    snap install canonical-livepatch

    echo "Wait for it to respond"
    for _ in $(seq 30); do
        if canonical-livepatch status > /dev/null 2>&1 ; then
            break
        fi
        sleep .5
    done

    echo "And ensure we get the expected status"
    canonical-livepatch status 2>&1 | MATCH "Machine is not enabled"