summary: Check the interfaces command details: | The "snap interfaces" command allows looking at plugs and slots in all the snaps on the system. The command provides different behavior when invoked with a snap name or with an interface name. 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 .*'