mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
This change adds extra self documentation and improbe organization and checks for interfaces tests.
27 lines
929 B
YAML
27 lines
929 B
YAML
summary: Check the interfaces command
|
|
|
|
environment:
|
|
SNAP_NAME: network-consumer
|
|
PLUG: network
|
|
|
|
prepare: |
|
|
echo "Given a snap with the $PLUG plug is installed"
|
|
"$TESTSTOOLS"/snaps-state install-local "$SNAP_NAME"
|
|
|
|
execute: |
|
|
expected="(?s)Slot +Plug\\n\
|
|
:$PLUG .*$SNAP_NAME"
|
|
|
|
echo "When the interfaces list is restricted by slot"
|
|
echo "Then only the requested slots are shown"
|
|
snap interfaces -i "$PLUG" | grep -Pzq "$expected"
|
|
|
|
echo "When the interfaces list is restricted by slot and snap"
|
|
echo "Then only the requested slots are shown"
|
|
snap interfaces -i "$PLUG" "$SNAP_NAME" | grep -Pzq "$expected"
|
|
|
|
echo "Implicit slots are exposed by a snap holding the nickname 'system'"
|
|
echo "but for compatibility they can also be listed when asking for 'core'"
|
|
snap interfaces -i network system | MATCH '^:network .*'
|
|
snap interfaces -i network core | MATCH '^:network .*'
|