Merge ~morphis/snappy-hwe-snaps/+git/network-manager:bug/adjust-for-new-wifi-ap into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master

Proposed by Simon Fels
Status: Merged
Approved by: Tony Espy
Approved revision: e5eed88a2830812d28266a46c27b127b31d33703
Merged at revision: 9c6d9a2e0b2ca8bf8f99169e37e2f39d979cc02e
Proposed branch: ~morphis/snappy-hwe-snaps/+git/network-manager:bug/adjust-for-new-wifi-ap
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master
Diff against target: 57 lines (+18/-8)
2 files modified
spread.yaml (+6/-0)
tests/main/wifi-connect-secured-ap/task.yaml (+12/-8)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Tony Espy Approve
Alfonso Sanchez-Beato Pending
Review via email: mp+314714@code.launchpad.net

Description of the change

test: fix wifi connect test case after new wifi-ap snap was published

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
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tony Espy (awe) wrote :

Looks good to me, although there's one comment which should be updated to match the associated code change.

review: Needs Fixing
Revision history for this message
Tony Espy (awe) wrote :

LGTM

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/spread.yaml b/spread.yaml
2index 0ae35a2..93cad8f 100644
3--- a/spread.yaml
4+++ b/spread.yaml
5@@ -39,6 +39,12 @@ exclude:
6 prepare: |
7 . $TESTSLIB/prepare-all.sh
8
9+# Default is 15 min but we use a higher one here as we build the entire
10+# network-manager snap inside the global prepare step so we need quite
11+# some time. Once we can reuse artifacts from other builds we can change
12+# this back to the default.
13+kill-timeout: 30m
14+
15 suites:
16 tests/main/:
17 summary: Full-system tests for NetworkManager without ethernet support
18diff --git a/tests/main/wifi-connect-secured-ap/task.yaml b/tests/main/wifi-connect-secured-ap/task.yaml
19index 2c7ed53..aa6a70c 100644
20--- a/tests/main/wifi-connect-secured-ap/task.yaml
21+++ b/tests/main/wifi-connect-secured-ap/task.yaml
22@@ -8,18 +8,22 @@ restore: |
23 rmmod mac80211_hwsim
24
25 execute: |
26- snap install wifi-ap
27-
28- # Get two connected wifi network interfaces wlan0 and wlan1
29+ # Get two connected wifi network interfaces wlan0 and wlan1 and
30+ # give the system soem time to settle
31 modprobe mac80211_hwsim radios=2
32+ sleep 1
33
34- # Setup the AP on wlan1
35- /snap/bin/wifi-ap.config set wifi.interface wlan1
36+ snap install wifi-ap
37+ # FIXME: until the wifi-ap utility is clever enough to retry
38+ # connecting with the service we need to add a short sleep here
39+ sleep 0.5
40+
41+ # Setup the AP on wlan0
42+ /snap/bin/wifi-ap.config set wifi.interface wlan0
43 /snap/bin/wifi-ap.config set wifi.ssid $WIFI_SSID
44 /snap/bin/wifi-ap.config set wifi.security wpa2
45 /snap/bin/wifi-ap.config set wifi.security-passphrase $WIFI_PASSPHRASE
46- /snap/bin/wifi-ap.config set disabled 0
47- systemctl restart snap.wifi-ap.backend
48+
49 # AP needs a bit to appear and be visible for NetworkManager
50 /snap/bin/network-manager.nmcli d wifi rescan
51 while ! /snap/bin/network-manager.nmcli d wifi | grep Ubuntu ; do
52@@ -31,4 +35,4 @@ execute: |
53
54 # Connect to the AP and ensure the connection was established
55 /snap/bin/network-manager.nmcli d wifi connect $WIFI_SSID password $WIFI_PASSPHRASE
56- /snap/bin/network-manager.nmcli d | grep 'wlan0.*connected'
57+ /snap/bin/network-manager.nmcli d | grep 'wlan1.*connected'

Subscribers

People subscribed via source and target branches