Merge ~kzapalowicz/snappy-hwe-snaps/+git/wifi-ap:fix/tests-grep-regexp into ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-ap:master

Proposed by Konrad Zapałowicz
Status: Merged
Approved by: Jim Hodapp
Approved revision: 6a6a636a8d5d62554171ec9bd1babf167402cb54
Merged at revision: a40daee8b98217e983ac8b7756a0c2fbaea4fb3c
Proposed branch: ~kzapalowicz/snappy-hwe-snaps/+git/wifi-ap:fix/tests-grep-regexp
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-ap:master
Diff against target: 17 lines (+3/-3)
1 file modified
tests/main/installation/task.yaml (+3/-3)
Reviewer Review Type Date Requested Status
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+323104@code.launchpad.net

Description of the change

tests: fix regexp for main/installation test

The updated regex should work for a situation where we check for a plug/slot connection of a snap that is not first on the connection
list - it is listed alphabetically.

E.g.:

:network-bind core,tpm2

The old version would return a failure as it started matching with spaces at the beginning. The new version understands that there might be a snap name too.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/main/installation/task.yaml b/tests/main/installation/task.yaml
2index 90cb364..7841dfc 100644
3--- a/tests/main/installation/task.yaml
4+++ b/tests/main/installation/task.yaml
5@@ -5,9 +5,9 @@ execute: |
6 systemctl status snap.wifi-ap.management-service
7
8 # Ensure all necessary plugs/slots are connected
9- snap interfaces | grep -Pzq ":network-control +wifi-ap"
10- snap interfaces | grep -Pzq ":firewall-control +wifi-ap"
11- snap interfaces | grep -Pzq ":network-bind +wifi-ap"
12+ snap interfaces | grep -Pzq ":network-control +[a-z,-]*wifi-ap"
13+ snap interfaces | grep -Pzq ":firewall-control +[a-z,-]*wifi-ap"
14+ snap interfaces | grep -Pzq ":network-bind +[a-z,-]*wifi-ap"
15 # As we don't have network-manager installed this one must
16 # be disconnected.
17 snap interfaces | grep -Pzq "(?s).*?\n- +wifi-ap:network-manager"

Subscribers

People subscribed via source and target branches