Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/network-manager:revert-manual-conn into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:snap-20

Proposed by Alfonso Sanchez-Beato on 2021-03-12
Status: Merged
Approved by: Alfonso Sanchez-Beato on 2021-03-12
Approved revision: c759d6ae6420f687a445a393406af52835c30e09
Merged at revision: c5a47815f0e12210c46f592acec49e1e6266f7aa
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/network-manager:revert-manual-conn
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:snap-20
Diff against target: 30 lines (+4/-9)
1 file modified
tests/lib/utilities.sh (+4/-9)
Reviewer Review Type Date Requested Status
Tony Espy Approve on 2021-03-12
System Enablement Bot continuous-integration 2021-03-12 Approve on 2021-03-12
Review via email: mp+399588@code.launchpad.net

Commit message

Revert "spread: fix tests to work with epochs"

This reverts commit bd2e479614ec595050aaf4f0f63f6aec12adc095.
The change was needed so tests could run after changing the
epoch. However, this caused races as connections happen after the snap
is installed, and NM starts without all the permissions it
needs. Revert this back as now we have an epoch 1 snap already
published in 20/beta and we can install it without errors.

Description of the change

Revert "spread: fix tests to work with epochs"

This reverts commit bd2e479614ec595050aaf4f0f63f6aec12adc095.
The change was needed so tests could run after changing the
epoch. However, this caused races as connections happen after the snap
is installed, and NM starts without all the permissions it
needs. Revert this back as now we have an epoch 1 snap already
published in 20/beta and we can install it without errors.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/lib/utilities.sh b/tests/lib/utilities.sh
2index b068085..ce6ca0e 100644
3--- a/tests/lib/utilities.sh
4+++ b/tests/lib/utilities.sh
5@@ -1,13 +1,5 @@
6 #!/bin/bash
7
8-snap_connect_ifaces() {
9- snap connect network-manager:firewall-control :firewall-control
10- snap connect network-manager:network :network
11- snap connect network-manager:network-setup-observe :network-setup-observe
12- snap connect network-manager:ppp :ppp
13- snap connect network-manager:nmcli network-manager:service
14-}
15-
16 snap_install() {
17 name=$1
18 if [ -n "$SNAP_CHANNEL" ] ; then
19@@ -16,8 +8,11 @@ snap_install() {
20 snap install --$SNAP_CHANNEL $name
21 fi
22 else
23+ # Need first install from store to get all necessary assertions into
24+ # place. Second local install will then bring in our locally built
25+ # snap.
26+ snap install $name $2
27 snap install --dangerous $PROJECT_PATH/$name*_amd64.snap
28- snap_connect_ifaces
29 fi
30 }
31

Subscribers

People subscribed via source and target branches