Merge ~morphis/snappy-hwe-snaps/+git/network-manager:bump-nm-version into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master

Proposed by Simon Fels
Status: Merged
Approved by: Simon Fels
Approved revision: 58be9d3bdae1c62dfcd196e4f79ac40806372e50
Merged at revision: 46bce75e4bc927375af26345bf8c6e6b3f053e53
Proposed branch: ~morphis/snappy-hwe-snaps/+git/network-manager:bump-nm-version
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master
Diff against target: 120 lines (+33/-18)
6 files modified
snapcraft.yaml (+1/-1)
tests/full/dhcp-leases-are-moved/task.yaml (+15/-5)
tests/lib/prepare-all.sh (+6/-0)
tests/lib/prepare.sh (+4/-7)
tests/main/switch-netplan-renderer/task.yaml (+2/-0)
tests/main/wifi-connect-secured-ap/task.yaml (+5/-5)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Tony Espy Approve
Review via email: mp+311754@code.launchpad.net

Description of the change

Bump the tag used for the network-manager source branch

This will get the DHCP lease movement test case working and prepares us for the next release.

This also fixes some spread tests which were failing in CI and we didn't fixed before.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Tony Espy (awe) wrote :

+1

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: 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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snapcraft.yaml b/snapcraft.yaml
2index 2e9044f..e34b875 100644
3--- a/snapcraft.yaml
4+++ b/snapcraft.yaml
5@@ -60,7 +60,7 @@ parts:
6 # needed. Otherwise use the tag to the latest version which will be
7 # used by the published snap.
8 # source-branch: network-manager/xenial/1.2.2
9- source-tag: network-manager-xenial-1.2.2-1
10+ source-tag: network-manager-xenial-1.2.2-2
11
12 build-packages:
13 - intltool
14diff --git a/tests/full/dhcp-leases-are-moved/task.yaml b/tests/full/dhcp-leases-are-moved/task.yaml
15index 1dc1914..80cf0e9 100644
16--- a/tests/full/dhcp-leases-are-moved/task.yaml
17+++ b/tests/full/dhcp-leases-are-moved/task.yaml
18@@ -5,13 +5,23 @@ execute: |
19
20 wait_for_network_manager
21
22- # We should have a single lease for eth0 at this point
23+ # We should have a single lease for eth0 at this point but give
24+ # NetworkManager some time to do its job
25 test -e /run/NetworkManager/dhcp
26 test -e /var/snap/network-manager/current/state/dhcp
27-
28- num_leases=`ls -1 /var/snap/network-manager/current/state/dhcp | wc -l`
29- num_public_leases=`ls -1 /run/NetworkManager/dhcp | wc -l`
30- test $num_leases -eq $num_public_leases
31+ n=0
32+ state_ok=0
33+ while [ $n -lt 10 ] ; do
34+ num_leases=`ls -1 /var/snap/network-manager/current/state/dhcp | wc -l`
35+ num_public_leases=`ls -1 /run/NetworkManager/dhcp | wc -l`
36+ if [ $num_leases -eq $num_public_leases ]; then
37+ state_ok=1
38+ break
39+ fi
40+ sleep 0.5
41+ let n=n+1
42+ done
43+ test $state_ok -eq 1
44
45 # Create a new lease file and ensure it gets copied over
46 test ! -e /run/NetworkManager/dhcp/temp.lease
47diff --git a/tests/lib/prepare-all.sh b/tests/lib/prepare-all.sh
48index 208cefa..6632406 100644
49--- a/tests/lib/prepare-all.sh
50+++ b/tests/lib/prepare-all.sh
51@@ -6,6 +6,12 @@ if [ -n "$SNAP_CHANNEL" ] ; then
52 exit 0
53 fi
54
55+# If there is a network-manager snap prebuilt for us, lets take
56+# that one to speed things up.
57+if [ -e /home/network-manager/network-manager_*_amd64.snap ] ; then
58+ exit 0
59+fi
60+
61 # Setup classic snap and build the network-manager snap in there
62 snap install --devmode --beta classic
63 cat <<-EOF > /home/test/build-snap.sh
64diff --git a/tests/lib/prepare.sh b/tests/lib/prepare.sh
65index 7df7c81..d290bbc 100644
66--- a/tests/lib/prepare.sh
67+++ b/tests/lib/prepare.sh
68@@ -29,14 +29,11 @@ if [ -n "$SNAP_CHANNEL" ] ; then
69 snap install --$SNAP_CHANNEL network-manager
70 fi
71 else
72- # Install prebuilt network-manager snap
73+ # Need first install from store to get all necessary assertions into
74+ # place. Second local install will then bring in our locally built
75+ # snap.
76+ snap install network-manager
77 snap install --dangerous /home/network-manager/network-manager_*_amd64.snap
78- # As we have a snap which we build locally its unasserted and therefor
79- # we don't have any snap-declarations in place and need to manually
80- # connect all plugs.
81- snap connect network-manager:nmcli network-manager:service
82- snap connect network-manager:network-setup-observe
83- snap connect network-manager:ppp
84 fi
85
86 # Snapshot of the current snapd state for a later restore
87diff --git a/tests/main/switch-netplan-renderer/task.yaml b/tests/main/switch-netplan-renderer/task.yaml
88index 1c05b68..4453b6a 100644
89--- a/tests/main/switch-netplan-renderer/task.yaml
90+++ b/tests/main/switch-netplan-renderer/task.yaml
91@@ -4,6 +4,8 @@ execute: |
92 . $TESTSLIB/utilities.sh
93 case "$SPREAD_REBOOT" in
94 0)
95+ wait_for_network_manager
96+
97 # networkd manages eth0 and NetworkManager does not
98 networkctl | grep 'eth0.*routable'
99 /snap/bin/network-manager.nmcli d | grep 'eth0.*unmanaged'
100diff --git a/tests/main/wifi-connect-secured-ap/task.yaml b/tests/main/wifi-connect-secured-ap/task.yaml
101index 036f8de..ed56a9b 100644
102--- a/tests/main/wifi-connect-secured-ap/task.yaml
103+++ b/tests/main/wifi-connect-secured-ap/task.yaml
104@@ -11,11 +11,11 @@ execute: |
105 modprobe mac80211_hwsim radios=2
106
107 # Setup the AP on wlan1
108- wifi-ap.config set wifi.interface wlan1
109- wifi-ap.config set wifi.ssid $WIFI_SSID
110- wifi-ap.config set wifi.security wpa2
111- wifi-ap.config set wifi.security-passphrase $WIFI_PASSPHRASE
112- wifi-ap.config set disabled 0
113+ /snap/bin/wifi-ap.config set wifi.interface wlan1
114+ /snap/bin/wifi-ap.config set wifi.ssid $WIFI_SSID
115+ /snap/bin/wifi-ap.config set wifi.security wpa2
116+ /snap/bin/wifi-ap.config set wifi.security-passphrase $WIFI_PASSPHRASE
117+ /snap/bin/wifi-ap.config set disabled 0
118 systemctl restart snap.wifi-ap.backend
119 # AP needs a bit to appear and be visible for NetworkManager
120 /snap/bin/network-manager.nmcli d wifi rescan

Subscribers

People subscribed via source and target branches