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 (31 lines) | stat: -rw-r--r-- 1,333 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
summary: Ensure that the content interface default provider deals with circular

details: |
    The content interface allows two or more snaps to access the same location
    under different names by creating a bind mount visible to the snap
    application process.

    On top of that, the content interface servers as weak dependency link
    between snaps, thanks to the default-provider attribute, which instructs
    snapd to install a default provider of the content if no such provider
    already exists in the system.

    The test checks a particular edge case where one snap is marked as a default
    provider of another, and vice-versa.

execute: |
    echo "When a snap declaring a content sharing plug is installed"
    snap install test-snapd-content-circular1

    echo "Then this pulls in the default provider"
    snap list | MATCH  test-snapd-content-circular1
    snap list | MATCH  test-snapd-content-circular2

    echo "Then the snap is listed as connected"
    snap interfaces
    CONNECTED_PATTERN_1="test-snapd-content-circular1:content-slot +test-snapd-content-circular2:content-plug"
    snap interfaces | MATCH "$CONNECTED_PATTERN_1"

    CONNECTED_PATTERN_2="test-snapd-content-circular2:content-slot +test-snapd-content-circular1:content-plug"
    snap interfaces | MATCH "$CONNECTED_PATTERN_2"