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"
|