Merge ~morphis/snappy-hwe-snaps/+git/engineering-tests:nm-powersave-tests into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Simon Fels
Status: Merged
Approved by: Jim Hodapp
Approved revision: bea0e29233449b8317409e9bf7d2c71cf754b988
Merged at revision: 283dbe83ac8dd9c41d1700cb5ad8d776f72a0c5d
Proposed branch: ~morphis/snappy-hwe-snaps/+git/engineering-tests:nm-powersave-tests
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 65 lines (+59/-0)
1 file modified
network-manager/units/wireless.pxu (+59/-0)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Needs Fixing
Jim Hodapp (community) code Approve
Review via email: mp+313000@code.launchpad.net

Description of the change

Add tests for WiFi powersave configuration feature

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
Jim Hodapp (jhodapp) wrote :

A few comments inline below.

review: Needs Fixing
Revision history for this message
Simon Fels (morphis) :
Revision history for this message
Jim Hodapp (jhodapp) wrote :

LGTM

review: Approve (code)
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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/network-manager/units/wireless.pxu b/network-manager/units/wireless.pxu
2new file mode 100644
3index 0000000..704bdd5
4--- /dev/null
5+++ b/network-manager/units/wireless.pxu
6@@ -0,0 +1,59 @@
7+# Copyright 2016 Canonical Ltd.
8+# All rights reserved.
9+#
10+# Written by:
11+# Simon Fels <simon.fels@canonical.com>
12+
13+unit: category
14+id: network_manager
15+_name: Network Manager
16+
17+id: network_manager/wireless/powersave_off_by_default
18+category_id: network_manager
19+plugin: manual
20+_summary: NetworkManager should disable powersave by default
21+_purpose:
22+ The powersave configuration option should cause the mode on the
23+ actual hardware device to be turned off by default.
24+_steps:
25+ Install wireless-tools snap and check that powersave is turned off
26+ on the actual hardware wireless device.
27+ $ snap install wireless-tools
28+_verification:
29+ The iw utility should return the following for the selected wireless device
30+ $ sudo wireless-tools.iw dev wlan0 get power_save
31+ Power save: off
32+
33+id: network_manager/wireless/powersave_config_default_off
34+category_id: network_manager
35+plugin: manual
36+_summary:
37+ The configuration option should be set to disable by default
38+_purpose:
39+ On installation the snap sets the option to a default value
40+ which should always be the same.
41+_steps:
42+ Retrieve the configuration value via
43+ $ snap get network-manager wifi.powersave
44+_verification:
45+ The returned value should be "disable".
46+
47+id: network_manager/wireless/powersave_can_be_enabled
48+category_id: network_manager
49+plugin: manual
50+_summary:
51+ Enabling powersave with the configuration option of the snap
52+ should turn it on.
53+_purpose:
54+ The network-manager snap uses a configure hook to control how
55+ the WiFi powersave option is set. It should be possible to enable
56+ the option on the actual hardware wireless device with it.
57+_steps:
58+ 1. Enable powersave via the configure hook
59+ $ snap set network-manager wifi.powersave=enable
60+_verification:
61+ Powersave should now be turned on for all wireless devices. This
62+ can be verified with
63+ $ snap install wireless-tools
64+ $ sudo wireless-tools.iw dev wlan0 get power_save
65+ Power save: on

Subscribers

People subscribed via source and target branches

to all changes: