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 (24 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
summary: Test snapctl install/remove

details: |
  Verifies that snactl install/remove works from snap apps and from snaps hooks.

systems: [ubuntu-16.04-64, ubuntu-18.04-64, ubuntu-2*, ubuntu-core-*, fedora-*]

execute: |
  SNAP_MOUNT_DIR="$(os.paths snap-mount-dir)"

  snap install --edge test-snap-components-snapctl

  # test command installs and removes components using snapctl (ephemeral context)
  test-snap-components-snapctl

  # run install from configure hook (non-ephemeral context)
  snap set test-snap-components-snapctl command="install +one+two"

  snap_rev=$(readlink "$SNAP_MOUNT_DIR"/test-snap-components-snapctl/current)
  MATCH "First component" < "$SNAP_MOUNT_DIR/test-snap-components-snapctl/components/$snap_rev/one/meta/component.yaml"
  MATCH "Second component" < "$SNAP_MOUNT_DIR/test-snap-components-snapctl/components/$snap_rev/two/meta/component.yaml"

  snap set test-snap-components-snapctl command="remove +one+two"
  test ! -d "$SNAP_MOUNT_DIR"/test-snap-components-snapctl/components/