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
|
summary: Check that auto-connections are not re-connected if disabled by the user
details: |
This test ensures that auto-connections are not restored if manually disconnected
by the user.
systems: [-ubuntu-core-*]
execute: |
CONNECTED_PATTERN=':home .* config-versions'
DISCONNECTED_PATTERN='\- .* config-versions:home'
echo "Install test snap"
"$TESTSTOOLS"/snaps-state install-local config-versions
echo "Expecting home interface to be automatically connected"
snap interfaces|MATCH "$CONNECTED_PATTERN"
echo "Manually disconnect home interface"
snap disconnect config-versions:home
snap interfaces|MATCH "$DISCONNECTED_PATTERN"
echo "Install a new version of the snap, expect home interface to remain disconnected"
"$TESTSTOOLS"/snaps-state install-local config-versions-v2
snap interfaces|MATCH "$DISCONNECTED_PATTERN"
echo "Revert to the rev 1, expect home interface to remain disconnected"
snap revert config-versions
snap interfaces|MATCH "$DISCONNECTED_PATTERN"
systemctl stop snapd.{service,socket}
systemctl start snapd.{service,socket}
echo "Manually connect home interface"
snap connect config-versions:home
snap interfaces|MATCH "$CONNECTED_PATTERN"
echo "Revert to the rev 2, expect home interface to remain connected"
snap revert --revision=x2 config-versions
snap interfaces|MATCH "$CONNECTED_PATTERN"
|