Merge ~morphis/snappy-hwe-snaps/+git/network-manager:f/fix-alias-setup into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master

Proposed by Simon Fels
Status: Merged
Approved by: Konrad Zapałowicz
Approved revision: 5b125d7b699be3dddea19ea41ee3552c83d70f6f
Merged at revision: e6a2c7606bf7599d5d5bdce3448140f3943418db
Proposed branch: ~morphis/snappy-hwe-snaps/+git/network-manager:f/fix-alias-setup
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master
Diff against target: 41 lines (+8/-5)
2 files modified
snapcraft.yaml (+2/-4)
tests/main/aliases/task.yaml (+6/-1)
Reviewer Review Type Date Requested Status
Konrad Zapałowicz (community) code Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+323972@code.launchpad.net

Description of the change

tests: fix alias setup for newer snapd versions

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
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

ack

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 9e0dcc3..9bf87e2 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -25,8 +25,7 @@ apps:
25 nmcli:25 nmcli:
26 command: usr/bin/nmcli26 command: usr/bin/nmcli
27 plugs: [nmcli]27 plugs: [nmcli]
28 aliases:28 aliases: [nmcli]
29 - nmcli
30 networkmanager:29 networkmanager:
31 command: bin/networkmanager30 command: bin/networkmanager
32 daemon: simple31 daemon: simple
@@ -39,8 +38,7 @@ apps:
39 # within the systemd unit file instead for example. Until this38 # within the systemd unit file instead for example. Until this
40 # is implemented we keep the alias disabled.39 # is implemented we keep the alias disabled.
41 #40 #
42 # aliases:41 # aliases: [NetworkManager]
43 # - NetworkManager
4442
45parts:43parts:
46 hooks:44 hooks:
diff --git a/tests/main/aliases/task.yaml b/tests/main/aliases/task.yaml
index e2eff9d..f3fd040 100644
--- a/tests/main/aliases/task.yaml
+++ b/tests/main/aliases/task.yaml
@@ -5,7 +5,12 @@ execute: |
5 # have them approved from the store in our snap-declaration assertion.5 # have them approved from the store in our snap-declaration assertion.
6 test ! -e /snap/bin/nmcli6 test ! -e /snap/bin/nmcli
77
8 snap alias network-manager nmcli8 snapd_version=$(snap version | awk '/^snapd / {print $2; exit}')
9 target=$SNAP_NAME.nmcli
10 if dpkg --compare-versions $snapd_version lt 2.25 ; then
11 target=$SNAP_NAME
12 fi
13 snap alias $target nmcli
914
10 test -e /snap/bin/nmcli15 test -e /snap/bin/nmcli
1116

Subscribers

People subscribed via source and target branches