Merge ~kissiel/snappy-hwe-snaps/+git/engineering-tests:one-provider into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Simon Fels
Approved revision: b5df7704bb79d4ac89aa65e1de1b88d58cad8cb6
Merged at revision: 85bcdb994f88ae4f4d84be1fb654fdee674eb5bc
Proposed branch: ~kissiel/snappy-hwe-snaps/+git/engineering-tests:one-provider
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 7192 lines (+3291/-149)
39 files modified
bin/run-bluez-tests (+1/-1)
bin/run-modem-manager-tests (+1/-1)
bin/run-network-manager-tests (+1/-1)
bin/run-pulseaudio-tests (+1/-1)
bin/run-tpm-tests (+1/-1)
bin/run-udisks2-tests (+1/-1)
bin/run-wifi-ap-tests (+1/-1)
bin/run-wireless-tools-tests (+1/-1)
com.canonical.se:engineering-tests/manage.py (+21/-0)
com.canonical.se:engineering-tests/units/alsa/base.pxu (+47/-0)
com.canonical.se:engineering-tests/units/alsa/device.pxu (+15/-0)
com.canonical.se:engineering-tests/units/alsa/playback.pxu (+1/-0)
com.canonical.se:engineering-tests/units/bluez/desktop.pxu (+142/-0)
com.canonical.se:engineering-tests/units/bluez/general.pxu (+302/-0)
com.canonical.se:engineering-tests/units/bluez/hid.pxu (+83/-0)
com.canonical.se:engineering-tests/units/bluez/setup.pxu (+140/-0)
com.canonical.se:engineering-tests/units/captive-redirect/captive-redirect.pxu (+102/-0)
com.canonical.se:engineering-tests/units/media-hub/media-hub-snap.pxu (+73/-0)
com.canonical.se:engineering-tests/units/media-hub/media-hub.pxu (+65/-0)
com.canonical.se:engineering-tests/units/modem-manager/modem-manager.pxu (+103/-0)
com.canonical.se:engineering-tests/units/network-manager/network-manager.pxu (+325/-0)
com.canonical.se:engineering-tests/units/network-manager/power_management.pxu (+31/-0)
com.canonical.se:engineering-tests/units/network-manager/snap.pxu (+101/-0)
com.canonical.se:engineering-tests/units/network-manager/wireless.pxu (+54/-0)
com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu (+106/-0)
com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu (+182/-0)
com.canonical.se:engineering-tests/units/test-plan.pxu (+9/-0)
com.canonical.se:engineering-tests/units/tpm/tpm.pxu (+135/-0)
com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu (+319/-0)
com.canonical.se:engineering-tests/units/upower/00_general.pxu (+52/-0)
com.canonical.se:engineering-tests/units/upower/10_battery_powered.pxu (+129/-0)
com.canonical.se:engineering-tests/units/upower/20_ac_powered.pxu (+49/-0)
com.canonical.se:engineering-tests/units/wifi-ap/wifi-ap.pxu (+213/-0)
com.canonical.se:engineering-tests/units/wifi-connect/wifi.connect.pxu (+202/-0)
com.canonical.se:engineering-tests/units/wireless-tools/wireless-tools.pxu (+100/-0)
com.canonical.se:engineering-tests/units/wpa-supplicant/00_general.pxu (+99/-0)
com.canonical.se:engineering-tests/units/wpa-supplicant/10_network_manager.pxu (+74/-0)
dev/null (+0/-74)
snapcraft.yaml (+9/-67)
Reviewer Review Type Date Requested Status
Konrad Zapałowicz (community) continuous-integration Approve
Simon Fels Approve
Maciej Kisielewski (community) Needs Resubmitting
Review via email: mp+328813@code.launchpad.net

Description of the change

Merge all the providers into one provider.

In order to empower reuse of the tests from engineering-tests, it's easier to have them in one plainbox-provider. They are all _provided_ by the same repository, so it IMHO makes more sense to have them grouped like that. Other (minor) benefit is having a lot less parts in snapcraft.yaml.

From a user's perspective nothing should change. I modified all the 'apps' to reflect the change in namespaces.

For your reviewing pleasure I baked a snap with what's on this branch:
https://drive.google.com/open?id=0B5xSCnq1-ZISdGtZLWpubkFwdDA

Potential follow up:
1) I left the alsa-utils reference untouched. The tests from A-U repo could live here, referencing, and requiring the A-U snap. This would deduplicate quite a bit.
2) All the 'apps' use plainbox run with a regex from commandline. I think having clearly defined "Test Plans" could be easier to use, maintain and - most importantly - reused.
3) Having a mix of dedicated 'launchers' (in ./bin) and direct calls could be improved, especially as a part of 2)
4) Theoretically plainbox should not be called. checkbox-cli should be used instead. This doesn't have any major importance here, as the benefits wouldn't be used (auto re-running of automated tests, bootstrapping test plans, ...)

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

And the real diff has more deletion than additions!
3218 insertions(+), 3389 deletions(-)

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

I added another series of changes, mostly related to moving alsa-related tests to this repo. This way alsa-utils will be cleaner, and engineering-tests wouldn't require (quite big) alsa-utils part.

review: Needs Resubmitting
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

lgtm

review: Approve (code)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

I'd like Simon's comments on this as he's the person who set up the original structure for these tests. If he's ok with it, then I am as well.

Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
Konrad Zapałowicz (kzapalowicz) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/run-bluez-tests b/bin/run-bluez-tests
2index fa2d908..dee47c0 100755
3--- a/bin/run-bluez-tests
4+++ b/bin/run-bluez-tests
5@@ -1,5 +1,5 @@
6 #!/bin/sh
7 export PATH="$PATH:$SNAP/usr/sbin"
8 exec python3 $(which plainbox) \
9- run -i '2016.com.canonical.bluez::bluez.*' \
10+ run -i '2017.com.canonical.se::bluez.*' \
11 "$@"
12diff --git a/bin/run-modem-manager-tests b/bin/run-modem-manager-tests
13index 02fea4b..3233da5 100755
14--- a/bin/run-modem-manager-tests
15+++ b/bin/run-modem-manager-tests
16@@ -1,5 +1,5 @@
17 #!/bin/sh
18 export PATH="$PATH:$SNAP/usr/sbin"
19 exec python3 $(which plainbox) \
20- run -i '2016.com.canonical.modem-manager::modem_manager.*' \
21+ run -i '2017.com.canonical.se::modem_manager.*' \
22 "$@"
23diff --git a/bin/run-network-manager-tests b/bin/run-network-manager-tests
24index 7f90af1..8d48253 100755
25--- a/bin/run-network-manager-tests
26+++ b/bin/run-network-manager-tests
27@@ -1,5 +1,5 @@
28 #!/bin/sh
29 export PATH="$PATH:$SNAP/usr/sbin"
30 exec python3 $(which plainbox) \
31- run -i '2016.com.canonical.network-manager::network_manager.*' \
32+ run -i '2017.com.canonical.se::network_manager.*' \
33 "$@"
34diff --git a/bin/run-pulseaudio-tests b/bin/run-pulseaudio-tests
35index 4e0b088..395e8eb 100755
36--- a/bin/run-pulseaudio-tests
37+++ b/bin/run-pulseaudio-tests
38@@ -1,5 +1,5 @@
39 #!/bin/sh
40 export PATH="$PATH:$SNAP/usr/sbin"
41 exec python3 $(which plainbox) \
42- run -i '2016.com.canonical.pulseaudio::pulseaudio.*' \
43+ run -i '2017.com.canonical.se::pulseaudio.*' \
44 "$@"
45diff --git a/bin/run-tpm-tests b/bin/run-tpm-tests
46index ea48ca1..5c08021 100755
47--- a/bin/run-tpm-tests
48+++ b/bin/run-tpm-tests
49@@ -1,5 +1,5 @@
50 #!/bin/sh
51 export PATH="$PATH:$SNAP/usr/sbin"
52 exec python3 $(which plainbox) \
53- run -i '2016.com.canonical.tpm::tpm.*' \
54+ run -i '2017.com.canonical.se::tpm.*' \
55 "$@"
56diff --git a/bin/run-udisks2-tests b/bin/run-udisks2-tests
57index 5d5c73e..73fac7a 100755
58--- a/bin/run-udisks2-tests
59+++ b/bin/run-udisks2-tests
60@@ -1,5 +1,5 @@
61 #!/bin/sh
62 export PATH="$PATH:$SNAP/usr/sbin"
63 exec python3 $(which plainbox) \
64- run -i '2017.com.canonical.udisks2::udisks2.*' \
65+ run -i '2017.com.canonical.se::udisks2.*' \
66 "$@"
67diff --git a/bin/run-wifi-ap-tests b/bin/run-wifi-ap-tests
68index 0d7dce0..f69ac83 100755
69--- a/bin/run-wifi-ap-tests
70+++ b/bin/run-wifi-ap-tests
71@@ -1,5 +1,5 @@
72 #!/bin/sh
73 export PATH="$PATH:$SNAP/usr/sbin"
74 exec python3 $(which plainbox) \
75- run -i '2016.com.canonical.wifi-ap::wifi_ap.*' \
76+ run -i '2017.com.canonical.se::wifi_ap.*' \
77 "$@"
78diff --git a/bin/run-wireless-tools-tests b/bin/run-wireless-tools-tests
79index 69f5769..491c041 100755
80--- a/bin/run-wireless-tools-tests
81+++ b/bin/run-wireless-tools-tests
82@@ -1,5 +1,5 @@
83 #!/bin/sh
84 export PATH="$PATH:$SNAP/usr/sbin"
85 exec python3 $(which plainbox) \
86- run -i '2016.com.canonical.wireless-tools::wireless-tools.*' \
87+ run -i '2017.com.canonical.se::wireless-tools.*' \
88 "$@"
89diff --git a/bluez/manage.py b/bluez/manage.py
90deleted file mode 100755
91index 78b0dbd..0000000
92--- a/bluez/manage.py
93+++ /dev/null
94@@ -1,10 +0,0 @@
95-#!/usr/bin/env python3
96-from plainbox.provider_manager import setup, N_
97-
98-setup(
99- name='plainbox-provider-bluez',
100- namespace='2016.com.canonical.bluez',
101- version="1.0",
102- description=N_("Plainbox provider for the BlueZ snap"),
103- gettext_domain="2016_com_canonical_bluez",
104-)
105diff --git a/bluez/units/desktop.pxu b/bluez/units/desktop.pxu
106deleted file mode 100644
107index 0075fa5..0000000
108--- a/bluez/units/desktop.pxu
109+++ /dev/null
110@@ -1,142 +0,0 @@
111-# Copyright (C) 2017 Canonical, Ltd.
112-# All rights reserved.
113-#
114-# Written by:
115-# Matteo Croce <matteo.croce@canonical.com>
116-
117-id: bluez/setup/enabled_on_boot_desktop
118-category_id: bluez
119-_description: Ensure that Bluetooth is enabled on boot
120-plugin: manual
121-_steps:
122- 1. Power on the PC
123- 2. If Bluetooth isn't enabled on first boot, enable it and reboot
124-_verification:
125- 1. Go to System Settings->Bluetooth
126- 2. Check that Bluetooth kill-switch is "on"
127- 3. Look at Bluetooth indicator: verify it is active and Bluetooth kill switch is "on"
128- 4. Verify that Bluetooth is still enabled
129-
130-id: bluez/setup/discoverable_by_default_desktop
131-category_id: bluez
132-_description: Ensure that device is discoverable by default
133-plugin: manual
134-_steps:
135- 1. Power on the PC
136- 2. Goto System Settings->Bluetooth
137-_verification:
138- In Ubuntu Touch devices the 'discoverable' option should be enabled by default,
139- in desktop devices it should not
140-
141-id: bluez/setup/bt_name_correct_desktop
142-category_id: bluez
143-_description: Ensure that the Bluetooth device name is correct
144-plugin: manual
145-_steps:
146- 1. Power on the PC
147-_verification:
148- 1. Go to System Settings->Bluetooth
149- 2. Verify that the Bluetooth device name is correct:
150- is set to the Ubuntu Touch device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch,
151- or to the hostname for desktop
152-
153-id: bluez/connection/device_cycle
154-category_id: bluez
155-_description: Verify that devices will reconnect after power cycle
156-plugin: manual
157-_steps:
158- 1. Go to Unity Control Center
159- 2. Click Search for devices
160- 3. Put the gadget in pairing mode
161- 4. Select the gadget from the list and click pair
162- 5. Power off the device
163- 6. Power on the device
164-_verification:
165- 1. Verify that the paired device will reconnect automatically,
166- eg. it appears bold in the list
167-
168-id: bluez/connection/device_disconnect
169-category_id: bluez
170-_description: Verify that the connected device can be disconnected
171-depends: bluez/connection/device_cycle
172-plugin: manual
173-_steps:
174- 1. Pair a device with a computer
175- 2. Remove the pairing
176- 3. Pair the device a second time
177-_verification:
178- 1. Verify that the device can connect again
179-
180-id: bluez/connection/pc_reboot
181-category_id: bluez
182-_description: Verify that devices will reconnect after reboot
183-depends: bluez/connection/device_cycle
184-plugin: manual
185-_steps:
186- 1. Pair a device with the computer
187- 2. Reboot the computer
188-_verification:
189- 1. Verify that the paired device will reconnect after rebooting it
190-
191-id: bluez/connection/device_discard
192-category_id: bluez
193-_description: Verify that the paired device can be forgotten
194-depends: bluez/connection/device_cycle
195-plugin: manual
196-_steps:
197- 1. Pair a device with the computer
198- 2. Remove the pairing
199-_verification:
200- 1. Verify that the paired device no longer appears in the devices list,
201- eg. it's NOT listed in bold in Unity Control Center
202-
203-id: bluez/connection/no_connect_discarded
204-category_id: bluez
205-_description: Verify that a discarded device don't connect
206-depends: bluez/connection/device_cycle
207-plugin: manual
208-_steps:
209- 1. Pair a device with the computer
210- 2. Remove the pairing
211-_verification:
212- 1. Verify that the paired device no longer connects
213-
214-id: bluez/connection/device_readd
215-category_id: bluez
216-_description: Verify that a discarded device can be paired again
217-depends: bluez/connection/device_cycle
218-plugin: manual
219-_steps:
220- 1. Pair a device with the computer
221- 2. Remove the pairing
222- 4. Pair the device again
223-_verification:
224- 1. Ensure that the device can connect
225-
226-id: bluez/discoverable/pc_not_discoverable
227-category_id: bluez
228-_description: Verify that the PC can disable discovery
229-plugin: manual
230-_steps:
231- 1. Toggle the PC Bluetooth visibility off
232-_verification:
233- 1. Ensure that the PC can't be discovered from any other device
234-
235-id: bluez/discoverable/pc_discoverable
236-category_id: bluez
237-_description: Verify that the PC can enable discovery
238-plugin: manual
239-_steps:
240- 1. Toggle the visibility on
241- 2. Do a Bluetooth scan from another device, eg. a smartphone
242-_verification:
243- 1. Ensure that the PC can be discovered from the other device
244-
245-id: bluez/setup/ensure_interface_connection_setup_desktop
246-category_id: bluez
247-_description: Ensure that the bluez interface is connected
248-plugin: manual
249-_verification:
250- Open a text editor and make sure you can type text from the HID keyboard
251- into the text box. If testing a mouse, ensure that the cursor moves when
252- moving your HID mouse.
253diff --git a/bluez/units/general.pxu b/bluez/units/general.pxu
254deleted file mode 100644
255index 18b8b52..0000000
256--- a/bluez/units/general.pxu
257+++ /dev/null
258@@ -1,302 +0,0 @@
259-# Copyright (C) 2017 Canonical, Ltd.
260-# All rights reserved.
261-#
262-# Written by:
263-# Jim Hodapp <jim.hodapp@canonical.com>
264-# Matteo Croce <matteo.croce@canonical.com>
265-
266-unit: category
267-id: bluez
268-_name: BlueZ
269-
270-id: bluez/setup/enabled_on_boot
271-category_id: bluez
272-_description: Ensure that Bluetooth is enabled on boot
273-plugin: manual
274-_steps:
275- 1. Power on the Device Under Test
276- 2. If Bluetooth isn't enabled on first boot, enable it and reboot
277- 3. Use bluetoothctl to check if there is an active adapter
278- .
279- $ bluetoothctl
280-_verification:
281- 1. Check that there is a Controller in the output, eg.
282- [NEW] Controller 00:10:20:30:40:50 pi [default]
283-
284-id: bluez/scan/start_inquiry
285-category_id: bluez
286-_description: Verify that found gadgets are reported during an ongoing device discovery
287-plugin: manual
288-_steps:
289- 1. Turn Bluetooth on on a gadget and make it discoverable
290- 2. Use bluetoothctl to start a device scan:
291- .
292- $ bluetoothctl
293- [bluetooth]# scan on
294- [bluetooth]# devices
295- .
296-_verification:
297- You should see the gadget listed after the local adapter:
298- Device XX:XX:XX:XX:XX:XX My Device
299- [NEW] Device 04:52:C7:0D:0C:03 QC 35s
300-
301-id: bluez/scan/stop_inquiry
302-category_id: bluez
303-_description: Verify that gadgets are not found with scan disabled
304-plugin: manual
305-_steps:
306- 1. Use bluetoothctl to start stop the device scan
307- .
308- $ bluetoothctl
309- [bluetooth]# scan off
310- .
311- 2. Turn bluetooth on on a gadget and make it discoverable
312- 3. Use bluetoothctl to get the devices list
313- .
314- $ bluetoothctl
315- [bluetooth]# devices
316- .
317-_verification:
318- You should only see the local adapter in the list
319- Device XX:XX:XX:XX:XX:XX My Device
320-
321-id: bluez/pairing/can_be_enabled
322-category_id: bluez
323-_description: Verify that the device pairing works
324-plugin: manual
325-_steps:
326- 1. Use bluetoothctl to enable pairing
327- .
328- $ bluetoothctl
329- [bluetooth]# pairable on
330- .
331- 2. Pair the Device Under Test from a gadget
332-_verification:
333- 1. You should be able to do the pairing
334-
335-id: bluez/pairing/can_be_disabled
336-category_id: bluez
337-_description: Verify that the pairing can be disabled
338-plugin: manual
339-_steps:
340- 1. Use bluetoothctl to disable pairing
341- .
342- $ bluetoothctl
343- [bluetooth]# pairable off
344- .
345- 2. Pair the Device Under Test from a gadget
346-_verification:
347- 1. You shouldn't be able to do the pairing
348-
349-id: bluez/setup/discoverable_by_default
350-category_id: bluez
351-_description: Ensure that Device Under Test is discoverable by default
352-plugin: manual
353-_steps:
354- 1. Type:
355- .
356- $ bluetoothctl
357- [bluetooth]# show
358- 2. Scan for devices from a smartphone
359-_verification:
360- 1. Verify that the Device Under Test is discoverable by default, eg.
361- .
362- $ bluetoothctl
363- [bluetooth]# show
364- .
365- contains the "Discoverable: yes" line
366- 2. Check that the Device Under Test can be discovered on the smartphone
367-
368-id: bluez/setup/bt_name_correct
369-category_id: bluez
370-_description: Ensure that the Bluetooth Device Under Test name is correct
371-plugin: manual
372-_steps:
373- 1. Type:
374- .
375- $ bluetoothctl
376- [bluetooth]# show
377-_verification:
378- 1. Verify that the Bluetooth Device Under Test name is correct: equals to the Ubuntu Touch
379- device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch,
380- or to the hostname for desktop
381- .
382- Name: Ubuntu
383-
384-id: bluez/setup/bt_name_correct_from_gadget
385-category_id: bluez
386-_description: Ensure that the Bluetooth Device Under Test name advertise correctly
387-plugin: manual
388-_steps:
389- 1. Scan for devices from a smartphone
390-_verification:
391- 1. Verify that the Bluetooth Device Under Test name is correct as seen from an external device
392-
393-id: bluez/connection/gadget_reconnect_after_power_cycle
394-category_id: bluez
395-_description: Verify that gadgets will reconnect after power cycle
396-plugin: manual
397-_steps:
398- 1. Connect a gadget with the Device Under Test:
399- .
400- $ bluetoothctl
401- bluetooth]# scan on
402- Discovery started
403- [NEW] Device 01:02:03:04:05:06 device
404- [bluetooth]# pair 01:02:03:04:05:06
405- Pairing successful
406- [bluetooth]# trust 01:02:03:04:05:06
407- Trusted
408- [bluetooth]# connect 01:02:03:04:05:06
409- .
410- 2. Power off the gadget
411- 3. Power on the gadget
412-_verification:
413- 1. Verify that the paired gadget will reconnect automatically
414- .
415- $ bluetoothctl
416- bluetooth]# info 01:02:03:04:05:06
417- .
418- and check for "Connected: Yes"
419-
420-id: bluez/connection/reconnect_after_dut_reboot
421-category_id: bluez
422-_description: Verify that gadgets will reconnect after reboot
423-plugin: manual
424-depends: bluez/connection/gadget_reconnect_after_power_cycle
425-_steps:
426- 1. Pair a gadget with the Device Under Test
427- 2. Reboot the Device Under Test
428-_verification:
429- 1. Verify that the paired gadget will reconnect after reboot
430-
431-id: bluez/connection/gadget_disconnect
432-category_id: bluez
433-_description: Verify that the connected gadget can be disconnected
434-plugin: manual
435-depends: bluez/connection/gadget_reconnect_after_power_cycle
436-_steps:
437- 1. Connect a gadget with the Device Under Test
438- 2. Disconnect it with:
439- .
440- $ bluetoothctl
441- [bluetooth]# disconnect 01:02:03:04:05:06
442- .
443-_verification:
444- 1. Verify that the gadget is disconnected
445- .
446- $ bluetoothctl
447- bluetooth]# info 01:02:03:04:05:06
448- .
449- and check for "Connected: no"
450-
451-id: bluez/connection/gadget_can_be_forgotten
452-category_id: bluez
453-_description: Verify that the paired gadget can be forgotten
454-plugin: manual
455-depends: bluez/connection/gadget_reconnect_after_power_cycle
456-_steps:
457- 1. Pair a gadget with the Device Under Test
458- 2. Remove the pairing
459- .
460- $ bluetoothctl
461- [bluetooth]# remove 01:02:03:04:05:06
462-_verification:
463- 1. Verify that the paired gadget no longer appears in the gadgets list
464- .
465- $ bluetoothctl
466- bluetooth]# info 01:02:03:04:05:06
467- .
468- and check for "Paired: no"
469-
470-id: bluez/connection/gadget_paired_again
471-category_id: bluez
472-_description: Verify that forgotten gadgets can be paired again
473-plugin: manual
474-depends: bluez/connection/gadget_can_be_forgotten
475-_steps:
476- 1. Pair a gadget with the Device Under Test
477- 2. Remove the pairing
478- 4. Pair the gadget a second time
479-_verification:
480- 1. Ensure that the gadget be paired again:
481- .
482- $ bluetoothctl
483- bluetooth]# info 01:02:03:04:05:06
484- .
485- and check for "Paired: yes"
486-
487-id: bluez/discoverable/dut_not_discoverable
488-category_id: bluez
489-_description: Verify that the Device Under Test can disable discovery
490-plugin: manual
491-_steps:
492- 1. Toggle the Device Under Test Bluetooth visibility off:
493- .
494- $ bluetoothctl
495- bluetooth]# discoverable off
496- .
497-_verification:
498- 1. Ensure that the Device Under Test can't be discovered from any other gadget
499-
500-id: bluez/discoverable/dut_discoverable
501-category_id: bluez
502-_description: Verify that the Device Under Test can enable discovery
503-plugin: manual
504-_steps:
505- 1. Toggle the Device Under Test Bluetooth visibility on
506- .
507- $ bluetoothctl
508- bluetooth]# discoverable on
509- .
510-_verification:
511- 1. Ensure that the Device Under Test can be discovered from other gadgets
512-
513-id: bluez/audio/a2dp_ubuntu_classic
514-category_id: bluez
515-plugin: manual
516-depends: bluez/connection/pair_and_connect
517-_summary: Stream audio to Bluetooth headset
518-_purpose:
519- Verify that you can stream music to a Bluetooth headset via A2DP on Ubuntu
520- Classic. Note: Skip this test if not running Ubuntu Classic
521-_steps:
522- 1. Follow the previous tests to list, pair and connect your headset
523- Navigate to the Sound panel in System Settings, select your headset device
524- in the Output tab, and make sure that Mode is set to A2DP
525- Then press the Test Sound button and test each speaker
526-_verification:
527- Verify that you can hear the test sound "Front left", "Front right" in each
528- speaker respectively.
529-
530-id: bluez/audio/a2dp_disconnect
531-category_id: bluez
532-plugin: manual
533-depends: bluez/audio/a2dp_ubuntu_classic
534-_summary: Disconnect Bluetooth headset
535-_purpose:
536- Verify that you can disconnect Bluetooth headset while streaming and audio
537- playback switches back to the Device Under Test's primary speaker
538-_steps:
539- 1. Follow the previous tests to start streaming audio to the headset via
540- A2DP. Then execute the following command to disconnect the headset from
541- active A2DP streaming:
542- .
543- [<dut_name>]# disconnect <gadget_address>
544-_verification:
545- Verify that you see output similar to the following:
546- Attempting to disconnect from 04:52:C7:0D:0C:03
547- [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
548- Successful disconnected
549- [CHG] Device 04:52:C7:0D:0C:03 Connected: no
550- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Key: 0x0110
551- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x40
552- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x0c
553- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x02
554- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x41
555- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x00
556- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x61
557- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x71
558- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0xcd
559- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x92
560- [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x6c
561diff --git a/bluez/units/hid.pxu b/bluez/units/hid.pxu
562deleted file mode 100644
563index 394e361..0000000
564--- a/bluez/units/hid.pxu
565+++ /dev/null
566@@ -1,83 +0,0 @@
567-# Copyright (C) 2017 Canonical, Ltd.
568-# All rights reserved.
569-#
570-# Written by:
571-# Matteo Croce <matteo.croce@canonical.com>
572-
573-id: bluez/hid/pair_and_connect_hid
574-category_id: bluez
575-plugin: manual
576-depends: bluez/setup/ensure_interface_connection_setup
577-_summary: A Bluetooth HID gadget (e.g. keyboard, mouse) is connected and paired
578-_purpose:
579- Check if your Bluetooth HID gadget of choice (e.g. keyboard, mouse) can be
580- paired to the host system.
581-_steps:
582- 1. Execute the following command to pair and connect your HID gadget to the
583- host system:
584- .
585- [bluetooth]# scan on
586- [bluetooth]# scan off
587- [bluetooth]# pair 01:02:03:04:05:06
588- [bluetooth]# connect 01:02:03:04:05:06
589- .
590-_verification:
591- Open a text editor and make sure you can type text from the HID keyboard
592- into the text box. If testing a mouse, ensure that the cursor moves when
593- moving your HID mouse
594-
595-id: bluez/hid/bt_mouse_works
596-category_id: bluez
597-_description: Verify that Bluetooth mice do work
598-plugin: manual
599-depends: bluez/hid/pair_and_connect_hid
600-_steps:
601- 1. Scan for a BT mouse and connect it to the DUT
602-_verification:
603- 1. Verify that the paired mouse can move the pointer
604- 2. Verify that the device is automatically connected at boot
605- 3. Verify that the device is automatically connected after resume from sleep
606-
607-id: bluez/hid/bt_keyboard_works
608-category_id: bluez
609-_description: Verify that Bluetooth keyboards do work
610-plugin: manual
611-_steps:
612- 1. Scan for a BT keyboard and connect it to the DUT, eg.
613- .
614- $ bluetoothctl
615- [bluetooth]# scan on
616- [bluetooth]# scan off
617- [bluetooth]# pair 01:02:03:04:05:06
618- Pairing successful
619- [bluetooth]# trust 01:02:03:04:05:06
620- [bluetooth]# connect 01:02:03:04:05:06
621- Trusted
622-_verification:
623- 1. Verify that the paired keyboard can write in a text editor
624- 2. Verify that the device is automatically connected at boot
625- 3. Verify that the device is automatically connected after resume from sleep
626- 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly
627-
628-id: bluez/hid/ble_mouse_works
629-category_id: bluez
630-_description: Verify that BLE mices do work
631-plugin: manual
632-_steps:
633- 1. Pair a BLE mouse with the DUT.
634-_verification:
635- 1. Verify that the paired mouse can move the pointer
636- 2. Verify that the device is automatically connected at boot
637- 3. Verify that the device is automatically connected after resume from sleep
638-
639-id: bluez/hid/ble_keyboard_works
640-category_id: bluez
641-_description: Verify that BLE keyboards do work
642-plugin: manual
643-_steps:
644- 1. Pair a BLE keyboard with the DUT.
645-_verification:
646- 1. Verify that the paired keyboard can write in a text editor
647- 2. Verify that the device is automatically connected at boot
648- 3. Verify that the device is automatically connected after resume from sleep
649- 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly
650diff --git a/bluez/units/setup.pxu b/bluez/units/setup.pxu
651deleted file mode 100644
652index 3060426..0000000
653--- a/bluez/units/setup.pxu
654+++ /dev/null
655@@ -1,140 +0,0 @@
656-# Copyright (C) 2017 Canonical, Ltd.
657-# All rights reserved.
658-#
659-# Written by:
660-# Matteo Croce <matteo.croce@canonical.com>
661-
662-id: bluez/setup/ensure_interface_connection_setup
663-category_id: bluez
664-_description: Ensure that the bluez interface is connected
665-plugin: manual
666-_steps:
667- 1. Connect required bluez slot/plug
668- .
669- $ sudo snap connect bluez:client bluez:service
670- .
671-_verification:
672- Verify that you see the following when running snap interfaces bluez:
673- bluez:service bluez:client
674-
675-id: bluez/snap/ensure_nonroot_cannot_use
676-category_id: bluez
677-plugin: manual
678-depends: bluez/setup/ensure_interface_connection_setup
679-_summary: bluetoothctl and obexctl cannot be run as non-root user
680-_purpose:
681- Verify that the bluetoothctl and obexctl commands cannot be run as non-root
682-_steps:
683- 1. Start the bluetoothctl and obexctl commands as non-root user
684- .
685- $ bluetoothctl
686- $ obexctl
687- .
688-_verification:
689- You should see outout similar to the following:
690- .
691- $ bluetoothctl
692- This script must be run as root
693- $ obexctl
694- This script must be run as root
695-
696-id: bluez/scan/get_all
697-category_id: bluez
698-plugin: manual
699-depends: bluez/setup/ensure_interface_connection_setup
700-_summary: All Bluetooth gadgets in range are listed
701-_purpose:
702- Check if all powered on gadgets that are within range as listed.
703-_steps:
704- 1. Execute the following command to retrieve the list of all Bluetooth gadgets:
705- .
706- $ /snap/bin/bluez.bluetoothctl
707- [bluetooth]# scan on
708- .
709-_verification:
710- Your expected Bluetooth gadget(s) is/are shown in the output list such as:
711- [NEW] Device 04:52:C7:0D:0C:03 QC 35s
712-
713-id: bluez/connection/pair_and_connect
714-category_id: bluez
715-plugin: manual
716-depends: bluez/setup/ensure_interface_connection_setup
717-_summary: A Bluetooth gadget of choice is paired and connected
718-_purpose:
719- Check if your Bluetooth gadget of choice can be paired to the host system.
720-_steps:
721- 1. Execute the following command to pair and connect your gadget to the host
722- system using the address listed in the previous scan test:
723- .
724- [bluetooth]# pair <gadget_address>
725- [bluetooth]# connect <gadget_address>
726- .
727-_verification:
728- You should see output similar to the following:
729- Attempting to pair with 04:52:C7:0D:0C:03
730- [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
731- [CHG] Device 04:52:C7:0D:0C:03 Modalias: bluetooth:v009Ep400Cd0106
732- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
733- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
734- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
735- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
736- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
737- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
738- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
739- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
740- [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
741- [CHG] Device 04:52:C7:0D:0C:03 Paired: yes
742- Pairing successful
743- [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
744- [CHG] Device 04:52:C7:0D:0C:03 Connected: no
745- Attempting to connect to 04:52:C7:0D:0C:03
746- [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
747- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
748- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
749- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
750- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
751- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
752- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
753- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
754- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
755- [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
756- Connection successful
757- [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
758-
759-id: bluez/snap/ensure_btmon_can_be started
760-category_id: bluez
761-plugin: manual
762-depends: bluez/setup/ensure_interface_connection_setup
763-_summary: btmon tools function
764-_purpose:
765- Check that the btmon tool shipped as a part of the bluez snap can be used.
766-_steps:
767- 1. Start the btmon command
768- .
769- $ sudo btmon
770- .
771-_verification:
772- You should see outout similar to the following:
773- .
774- $ sudo btmon
775- Bluetooth monitor ver 5.37
776- = New Index: 00:1A:7D:DA:71:08 (BR/EDR,USB,hci0) [hci0] 0.626494
777-
778-id: bluez/snap/ensure_hcidump_can_be started
779-category_id: bluez
780-plugin: manual
781-depends: bluez/setup/ensure_interface_connection_setup
782-_summary: btmon tools works
783-_purpose:
784- Check that the hcidump tool shipped as a part of the bluez snap can be used.
785-_steps:
786- 1. Start the hcidump command
787- .
788- $ sudo hcidump
789- .
790-_verification:
791- You should see outout similar to the following:
792- .
793- $ sudo hcidump
794- HCI sniffer - Bluetooth packet analyzer ver 5.37
795- device: hci0 snap_len: 1500 filter: 0xffffffff
796diff --git a/captive-redirect/manage.py b/captive-redirect/manage.py
797deleted file mode 100755
798index 56ea1c8..0000000
799--- a/captive-redirect/manage.py
800+++ /dev/null
801@@ -1,10 +0,0 @@
802-#!/usr/bin/env python3
803-from plainbox.provider_manager import setup, N_
804-
805-setup(
806- name='plainbox-provider-captive-redirect',
807- namespace='2017.com.canonical.captive-redirect',
808- version="1.0",
809- description=N_("Plainbox provider for the Captive Redirect snap"),
810- gettext_domain="2017_com_canonical_captive_redirect",
811-)
812diff --git a/captive-redirect/units/captive-redirect.pxu b/captive-redirect/units/captive-redirect.pxu
813deleted file mode 100644
814index d45f0e6..0000000
815--- a/captive-redirect/units/captive-redirect.pxu
816+++ /dev/null
817@@ -1,102 +0,0 @@
818-# Copyright (C) 2017 Canonical Ltd.
819-# All rights reserved.
820-#
821-# Written by:
822-# Matteo Croce <matteo.croce@canonical.com>
823-
824-unit: category
825-id: captive_redirect
826-_name: Captive portal redirect
827-
828-id: captive_redirect/setup/ensure_interface_connection_setup
829-category_id: captive_redirect
830-_description: Ensure that the captive-redirect interfaces are connected
831-plugin: manual
832-_steps:
833- 1. Install the captive-redirect snap via
834- .
835- $ snap install captive-redirect
836- .
837-_verification:
838- Verify that you see the following when running snap interfaces:
839- :firewall-control captive-redirect
840-
841-id: captive_redirect/setup/default_disabled
842-category_id: captive_redirect
843-_description: Ensure that captive-redirect is disabled by default
844-plugin: manual
845-_steps:
846- 1. Get the configuration with:
847- .
848- $ captive-redirect.config status
849- .
850- 2. Ensure that there isn't any REDIRECT iptables chain:
851- .
852- $ sudo iptables-save |grep captive
853- .
854-_verification:
855- 1. Check that the redirect is disabled:
856- .
857- active: false
858- .
859- 2. You shouldn't see any iptables rule
860-
861-id: captive_redirect/setup/iptables_rules_all_interfaces
862-category_id: captive_redirect
863-_description: Ensure that enabling captive-redirect sets up the correct iptables rules
864-plugin: manual
865-_steps:
866- 1. Enable captive-redirect with:
867- .
868- $ sudo snap set captive-redirect active=true port=9876
869- .
870- 2. Get the iptables rules with:
871- .
872- $ sudo iptables-save |grep captive
873- .
874-_verification:
875- 1. You should see iptables rules like:
876- .
877- :captive - [0:0]
878- -A PREROUTING -j captive
879- -A captive -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9876
880- .
881-
882-id: captive_redirect/setup/iptables_rules_one_interface
883-category_id: captive_redirect
884-_description: Ensure that enabling captive-redirect sets up iptables rules for a single interface
885-plugin: manual
886-_steps:
887- 1. Enable captive-redirect with:
888- .
889- $ sudo snap set captive-redirect active=true port=9999 interfaces=tun4
890- .
891- 2. Get the iptables rules with:
892- .
893- $ sudo iptables-save |grep captive
894- .
895-_verification:
896- 1. You should see iptables rules like:
897- .
898- :captive - [0:0]
899- -A PREROUTING -j captive
900- -A captive -i tun4 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9999
901- .
902-
903-id: captive_redirect/functionality/redirect_works
904-category_id: captive_redirect
905-_description: Ensure that enabling captive-redirect really redirects the traffic
906-plugin: manual
907-_steps:
908- 1. Install a sample web server with:
909- .
910- $ sudo snap install xkcd-webserver
911- .
912- 2. Connect another device to the DUT (Device Under Test) and setup the DUT as default gateway
913- 3. Enable the redirect with:
914- .
915- $ sudo snap set captive-redirect active=true port=80 interfaces=
916- .
917- 4. Try to access an HTTP (avoid HTTPS, it will give a certificate error) web page from the device
918-_verification:
919- 1. You should see a blank page pointing to XKCD instead of the typed address
920diff --git a/com.canonical.se:engineering-tests/manage.py b/com.canonical.se:engineering-tests/manage.py
921new file mode 100755
922index 0000000..6a27365
923--- /dev/null
924+++ b/com.canonical.se:engineering-tests/manage.py
925@@ -0,0 +1,21 @@
926+#!/usr/bin/env python3
927+from plainbox.provider_manager import setup, N_
928+
929+# You can inject other stuff here but please don't go overboard.
930+#
931+# In particular, if you need comprehensive compilation support to get
932+# your bin/ populated then please try to discuss that with us in the
933+# upstream project IRC channel #checkbox on irc.freenode.net.
934+
935+# NOTE: one thing that you could do here, that makes a lot of sense,
936+# is to compute version somehow. This may vary depending on the
937+# context of your provider. Future version of PlainBox will offer git,
938+# bzr and mercurial integration using the versiontools library
939+# (optional)
940+
941+setup(
942+ name='2017.com.canonical.se:engineering-tests',
943+ version="1.0",
944+ description=N_("The com.canonical.se:engineering-tests provider"),
945+ gettext_domain="com_canonical_se_engineering-tests",
946+)
947diff --git a/com.canonical.se:engineering-tests/units/alsa/base.pxu b/com.canonical.se:engineering-tests/units/alsa/base.pxu
948new file mode 100644
949index 0000000..077a012
950--- /dev/null
951+++ b/com.canonical.se:engineering-tests/units/alsa/base.pxu
952@@ -0,0 +1,47 @@
953+# Copyright (c) 2017 Canonical Ltd.
954+# All rights resevered.
955+#
956+# Written by:
957+# Simon Fels <simon.fels@canonical.com>
958+
959+unit: category
960+id: alsa_utils
961+_name: Alsa utilities
962+
963+id: alsa_utils/setup/automatic_plug_connection
964+category_id: alsa_utils
965+_description:
966+ Ensure that all interfaces needed by the alsa-utils snap are
967+ automatically connected.
968+plugin: shell
969+command:
970+ snap interfaces | grep -Pzq ":home +alsa-utils"
971+ snap interfaces | grep -Pzq ":alsa +alsa-utils"
972+estimated_duration: 1s
973+flags: preserve-locale
974+
975+id: alsa_utils/setup/automatic_aliases
976+category_id: alsa_utils
977+_description:
978+ Ensure that all aliases provided by the snap are automatically setup.
979+plugin: shell
980+command:
981+ test -x /snap/bin/speaker-test
982+ test -x /snap/bin/aseqnet
983+ test -x /snap/bin/alsatplg
984+ test -x /snap/bin/arecordmidi
985+ test -x /snap/bin/amidi
986+ test -x /snap/bin/alsaloop
987+ test -x /snap/bin/aconnect
988+ test -x /snap/bin/iecset
989+ test -x /snap/bin/alsabat
990+ test -x /snap/bin/aseqdump
991+ test -x /snap/bin/aplaymidi
992+ test -x /snap/bin/alsactl
993+ test -x /snap/bin/amixer
994+ test -x /snap/bin/aplay
995+ test -x /snap/bin/alsaucm
996+ test -x /snap/bin/alsamixer
997+ test -x /snap/bin/arecord
998+estimated_duration: 1s
999+flags: preserve-locale
1000diff --git a/com.canonical.se:engineering-tests/units/alsa/device.pxu b/com.canonical.se:engineering-tests/units/alsa/device.pxu
1001new file mode 100644
1002index 0000000..a3f7b34
1003--- /dev/null
1004+++ b/com.canonical.se:engineering-tests/units/alsa/device.pxu
1005@@ -0,0 +1,15 @@
1006+# FIXME: Convert this test back to an automated one. See LP #1665652
1007+id: alsa_utils/device/can_list_available_cards
1008+category_id: alsa_utils
1009+_description:
1010+ Validate that available ALSA sound cards can be listed with the
1011+ utilities the snap ships.
1012+plugin: manual
1013+_steps:
1014+ Execute the following command:
1015+ .
1016+ $ /snap/bin/aplay -L
1017+ .
1018+_verification:
1019+ Verify that the command prints out a list of available ALSA
1020+ devices.
1021diff --git a/com.canonical.se:engineering-tests/units/alsa/playback.pxu b/com.canonical.se:engineering-tests/units/alsa/playback.pxu
1022new file mode 100644
1023index 0000000..d1a8083
1024--- /dev/null
1025+++ b/com.canonical.se:engineering-tests/units/alsa/playback.pxu
1026@@ -0,0 +1 @@
1027+# FIXME: Convert this test back to an automated one. See LP #1665652
1028diff --git a/com.canonical.se:engineering-tests/units/bluez/desktop.pxu b/com.canonical.se:engineering-tests/units/bluez/desktop.pxu
1029new file mode 100644
1030index 0000000..0075fa5
1031--- /dev/null
1032+++ b/com.canonical.se:engineering-tests/units/bluez/desktop.pxu
1033@@ -0,0 +1,142 @@
1034+# Copyright (C) 2017 Canonical, Ltd.
1035+# All rights reserved.
1036+#
1037+# Written by:
1038+# Matteo Croce <matteo.croce@canonical.com>
1039+
1040+id: bluez/setup/enabled_on_boot_desktop
1041+category_id: bluez
1042+_description: Ensure that Bluetooth is enabled on boot
1043+plugin: manual
1044+_steps:
1045+ 1. Power on the PC
1046+ 2. If Bluetooth isn't enabled on first boot, enable it and reboot
1047+_verification:
1048+ 1. Go to System Settings->Bluetooth
1049+ 2. Check that Bluetooth kill-switch is "on"
1050+ 3. Look at Bluetooth indicator: verify it is active and Bluetooth kill switch is "on"
1051+ 4. Verify that Bluetooth is still enabled
1052+
1053+id: bluez/setup/discoverable_by_default_desktop
1054+category_id: bluez
1055+_description: Ensure that device is discoverable by default
1056+plugin: manual
1057+_steps:
1058+ 1. Power on the PC
1059+ 2. Goto System Settings->Bluetooth
1060+_verification:
1061+ In Ubuntu Touch devices the 'discoverable' option should be enabled by default,
1062+ in desktop devices it should not
1063+
1064+id: bluez/setup/bt_name_correct_desktop
1065+category_id: bluez
1066+_description: Ensure that the Bluetooth device name is correct
1067+plugin: manual
1068+_steps:
1069+ 1. Power on the PC
1070+_verification:
1071+ 1. Go to System Settings->Bluetooth
1072+ 2. Verify that the Bluetooth device name is correct:
1073+ is set to the Ubuntu Touch device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch,
1074+ or to the hostname for desktop
1075+
1076+id: bluez/connection/device_cycle
1077+category_id: bluez
1078+_description: Verify that devices will reconnect after power cycle
1079+plugin: manual
1080+_steps:
1081+ 1. Go to Unity Control Center
1082+ 2. Click Search for devices
1083+ 3. Put the gadget in pairing mode
1084+ 4. Select the gadget from the list and click pair
1085+ 5. Power off the device
1086+ 6. Power on the device
1087+_verification:
1088+ 1. Verify that the paired device will reconnect automatically,
1089+ eg. it appears bold in the list
1090+
1091+id: bluez/connection/device_disconnect
1092+category_id: bluez
1093+_description: Verify that the connected device can be disconnected
1094+depends: bluez/connection/device_cycle
1095+plugin: manual
1096+_steps:
1097+ 1. Pair a device with a computer
1098+ 2. Remove the pairing
1099+ 3. Pair the device a second time
1100+_verification:
1101+ 1. Verify that the device can connect again
1102+
1103+id: bluez/connection/pc_reboot
1104+category_id: bluez
1105+_description: Verify that devices will reconnect after reboot
1106+depends: bluez/connection/device_cycle
1107+plugin: manual
1108+_steps:
1109+ 1. Pair a device with the computer
1110+ 2. Reboot the computer
1111+_verification:
1112+ 1. Verify that the paired device will reconnect after rebooting it
1113+
1114+id: bluez/connection/device_discard
1115+category_id: bluez
1116+_description: Verify that the paired device can be forgotten
1117+depends: bluez/connection/device_cycle
1118+plugin: manual
1119+_steps:
1120+ 1. Pair a device with the computer
1121+ 2. Remove the pairing
1122+_verification:
1123+ 1. Verify that the paired device no longer appears in the devices list,
1124+ eg. it's NOT listed in bold in Unity Control Center
1125+
1126+id: bluez/connection/no_connect_discarded
1127+category_id: bluez
1128+_description: Verify that a discarded device don't connect
1129+depends: bluez/connection/device_cycle
1130+plugin: manual
1131+_steps:
1132+ 1. Pair a device with the computer
1133+ 2. Remove the pairing
1134+_verification:
1135+ 1. Verify that the paired device no longer connects
1136+
1137+id: bluez/connection/device_readd
1138+category_id: bluez
1139+_description: Verify that a discarded device can be paired again
1140+depends: bluez/connection/device_cycle
1141+plugin: manual
1142+_steps:
1143+ 1. Pair a device with the computer
1144+ 2. Remove the pairing
1145+ 4. Pair the device again
1146+_verification:
1147+ 1. Ensure that the device can connect
1148+
1149+id: bluez/discoverable/pc_not_discoverable
1150+category_id: bluez
1151+_description: Verify that the PC can disable discovery
1152+plugin: manual
1153+_steps:
1154+ 1. Toggle the PC Bluetooth visibility off
1155+_verification:
1156+ 1. Ensure that the PC can't be discovered from any other device
1157+
1158+id: bluez/discoverable/pc_discoverable
1159+category_id: bluez
1160+_description: Verify that the PC can enable discovery
1161+plugin: manual
1162+_steps:
1163+ 1. Toggle the visibility on
1164+ 2. Do a Bluetooth scan from another device, eg. a smartphone
1165+_verification:
1166+ 1. Ensure that the PC can be discovered from the other device
1167+
1168+id: bluez/setup/ensure_interface_connection_setup_desktop
1169+category_id: bluez
1170+_description: Ensure that the bluez interface is connected
1171+plugin: manual
1172+_verification:
1173+ Open a text editor and make sure you can type text from the HID keyboard
1174+ into the text box. If testing a mouse, ensure that the cursor moves when
1175+ moving your HID mouse.
1176diff --git a/com.canonical.se:engineering-tests/units/bluez/general.pxu b/com.canonical.se:engineering-tests/units/bluez/general.pxu
1177new file mode 100644
1178index 0000000..18b8b52
1179--- /dev/null
1180+++ b/com.canonical.se:engineering-tests/units/bluez/general.pxu
1181@@ -0,0 +1,302 @@
1182+# Copyright (C) 2017 Canonical, Ltd.
1183+# All rights reserved.
1184+#
1185+# Written by:
1186+# Jim Hodapp <jim.hodapp@canonical.com>
1187+# Matteo Croce <matteo.croce@canonical.com>
1188+
1189+unit: category
1190+id: bluez
1191+_name: BlueZ
1192+
1193+id: bluez/setup/enabled_on_boot
1194+category_id: bluez
1195+_description: Ensure that Bluetooth is enabled on boot
1196+plugin: manual
1197+_steps:
1198+ 1. Power on the Device Under Test
1199+ 2. If Bluetooth isn't enabled on first boot, enable it and reboot
1200+ 3. Use bluetoothctl to check if there is an active adapter
1201+ .
1202+ $ bluetoothctl
1203+_verification:
1204+ 1. Check that there is a Controller in the output, eg.
1205+ [NEW] Controller 00:10:20:30:40:50 pi [default]
1206+
1207+id: bluez/scan/start_inquiry
1208+category_id: bluez
1209+_description: Verify that found gadgets are reported during an ongoing device discovery
1210+plugin: manual
1211+_steps:
1212+ 1. Turn Bluetooth on on a gadget and make it discoverable
1213+ 2. Use bluetoothctl to start a device scan:
1214+ .
1215+ $ bluetoothctl
1216+ [bluetooth]# scan on
1217+ [bluetooth]# devices
1218+ .
1219+_verification:
1220+ You should see the gadget listed after the local adapter:
1221+ Device XX:XX:XX:XX:XX:XX My Device
1222+ [NEW] Device 04:52:C7:0D:0C:03 QC 35s
1223+
1224+id: bluez/scan/stop_inquiry
1225+category_id: bluez
1226+_description: Verify that gadgets are not found with scan disabled
1227+plugin: manual
1228+_steps:
1229+ 1. Use bluetoothctl to start stop the device scan
1230+ .
1231+ $ bluetoothctl
1232+ [bluetooth]# scan off
1233+ .
1234+ 2. Turn bluetooth on on a gadget and make it discoverable
1235+ 3. Use bluetoothctl to get the devices list
1236+ .
1237+ $ bluetoothctl
1238+ [bluetooth]# devices
1239+ .
1240+_verification:
1241+ You should only see the local adapter in the list
1242+ Device XX:XX:XX:XX:XX:XX My Device
1243+
1244+id: bluez/pairing/can_be_enabled
1245+category_id: bluez
1246+_description: Verify that the device pairing works
1247+plugin: manual
1248+_steps:
1249+ 1. Use bluetoothctl to enable pairing
1250+ .
1251+ $ bluetoothctl
1252+ [bluetooth]# pairable on
1253+ .
1254+ 2. Pair the Device Under Test from a gadget
1255+_verification:
1256+ 1. You should be able to do the pairing
1257+
1258+id: bluez/pairing/can_be_disabled
1259+category_id: bluez
1260+_description: Verify that the pairing can be disabled
1261+plugin: manual
1262+_steps:
1263+ 1. Use bluetoothctl to disable pairing
1264+ .
1265+ $ bluetoothctl
1266+ [bluetooth]# pairable off
1267+ .
1268+ 2. Pair the Device Under Test from a gadget
1269+_verification:
1270+ 1. You shouldn't be able to do the pairing
1271+
1272+id: bluez/setup/discoverable_by_default
1273+category_id: bluez
1274+_description: Ensure that Device Under Test is discoverable by default
1275+plugin: manual
1276+_steps:
1277+ 1. Type:
1278+ .
1279+ $ bluetoothctl
1280+ [bluetooth]# show
1281+ 2. Scan for devices from a smartphone
1282+_verification:
1283+ 1. Verify that the Device Under Test is discoverable by default, eg.
1284+ .
1285+ $ bluetoothctl
1286+ [bluetooth]# show
1287+ .
1288+ contains the "Discoverable: yes" line
1289+ 2. Check that the Device Under Test can be discovered on the smartphone
1290+
1291+id: bluez/setup/bt_name_correct
1292+category_id: bluez
1293+_description: Ensure that the Bluetooth Device Under Test name is correct
1294+plugin: manual
1295+_steps:
1296+ 1. Type:
1297+ .
1298+ $ bluetoothctl
1299+ [bluetooth]# show
1300+_verification:
1301+ 1. Verify that the Bluetooth Device Under Test name is correct: equals to the Ubuntu Touch
1302+ device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch,
1303+ or to the hostname for desktop
1304+ .
1305+ Name: Ubuntu
1306+
1307+id: bluez/setup/bt_name_correct_from_gadget
1308+category_id: bluez
1309+_description: Ensure that the Bluetooth Device Under Test name advertise correctly
1310+plugin: manual
1311+_steps:
1312+ 1. Scan for devices from a smartphone
1313+_verification:
1314+ 1. Verify that the Bluetooth Device Under Test name is correct as seen from an external device
1315+
1316+id: bluez/connection/gadget_reconnect_after_power_cycle
1317+category_id: bluez
1318+_description: Verify that gadgets will reconnect after power cycle
1319+plugin: manual
1320+_steps:
1321+ 1. Connect a gadget with the Device Under Test:
1322+ .
1323+ $ bluetoothctl
1324+ bluetooth]# scan on
1325+ Discovery started
1326+ [NEW] Device 01:02:03:04:05:06 device
1327+ [bluetooth]# pair 01:02:03:04:05:06
1328+ Pairing successful
1329+ [bluetooth]# trust 01:02:03:04:05:06
1330+ Trusted
1331+ [bluetooth]# connect 01:02:03:04:05:06
1332+ .
1333+ 2. Power off the gadget
1334+ 3. Power on the gadget
1335+_verification:
1336+ 1. Verify that the paired gadget will reconnect automatically
1337+ .
1338+ $ bluetoothctl
1339+ bluetooth]# info 01:02:03:04:05:06
1340+ .
1341+ and check for "Connected: Yes"
1342+
1343+id: bluez/connection/reconnect_after_dut_reboot
1344+category_id: bluez
1345+_description: Verify that gadgets will reconnect after reboot
1346+plugin: manual
1347+depends: bluez/connection/gadget_reconnect_after_power_cycle
1348+_steps:
1349+ 1. Pair a gadget with the Device Under Test
1350+ 2. Reboot the Device Under Test
1351+_verification:
1352+ 1. Verify that the paired gadget will reconnect after reboot
1353+
1354+id: bluez/connection/gadget_disconnect
1355+category_id: bluez
1356+_description: Verify that the connected gadget can be disconnected
1357+plugin: manual
1358+depends: bluez/connection/gadget_reconnect_after_power_cycle
1359+_steps:
1360+ 1. Connect a gadget with the Device Under Test
1361+ 2. Disconnect it with:
1362+ .
1363+ $ bluetoothctl
1364+ [bluetooth]# disconnect 01:02:03:04:05:06
1365+ .
1366+_verification:
1367+ 1. Verify that the gadget is disconnected
1368+ .
1369+ $ bluetoothctl
1370+ bluetooth]# info 01:02:03:04:05:06
1371+ .
1372+ and check for "Connected: no"
1373+
1374+id: bluez/connection/gadget_can_be_forgotten
1375+category_id: bluez
1376+_description: Verify that the paired gadget can be forgotten
1377+plugin: manual
1378+depends: bluez/connection/gadget_reconnect_after_power_cycle
1379+_steps:
1380+ 1. Pair a gadget with the Device Under Test
1381+ 2. Remove the pairing
1382+ .
1383+ $ bluetoothctl
1384+ [bluetooth]# remove 01:02:03:04:05:06
1385+_verification:
1386+ 1. Verify that the paired gadget no longer appears in the gadgets list
1387+ .
1388+ $ bluetoothctl
1389+ bluetooth]# info 01:02:03:04:05:06
1390+ .
1391+ and check for "Paired: no"
1392+
1393+id: bluez/connection/gadget_paired_again
1394+category_id: bluez
1395+_description: Verify that forgotten gadgets can be paired again
1396+plugin: manual
1397+depends: bluez/connection/gadget_can_be_forgotten
1398+_steps:
1399+ 1. Pair a gadget with the Device Under Test
1400+ 2. Remove the pairing
1401+ 4. Pair the gadget a second time
1402+_verification:
1403+ 1. Ensure that the gadget be paired again:
1404+ .
1405+ $ bluetoothctl
1406+ bluetooth]# info 01:02:03:04:05:06
1407+ .
1408+ and check for "Paired: yes"
1409+
1410+id: bluez/discoverable/dut_not_discoverable
1411+category_id: bluez
1412+_description: Verify that the Device Under Test can disable discovery
1413+plugin: manual
1414+_steps:
1415+ 1. Toggle the Device Under Test Bluetooth visibility off:
1416+ .
1417+ $ bluetoothctl
1418+ bluetooth]# discoverable off
1419+ .
1420+_verification:
1421+ 1. Ensure that the Device Under Test can't be discovered from any other gadget
1422+
1423+id: bluez/discoverable/dut_discoverable
1424+category_id: bluez
1425+_description: Verify that the Device Under Test can enable discovery
1426+plugin: manual
1427+_steps:
1428+ 1. Toggle the Device Under Test Bluetooth visibility on
1429+ .
1430+ $ bluetoothctl
1431+ bluetooth]# discoverable on
1432+ .
1433+_verification:
1434+ 1. Ensure that the Device Under Test can be discovered from other gadgets
1435+
1436+id: bluez/audio/a2dp_ubuntu_classic
1437+category_id: bluez
1438+plugin: manual
1439+depends: bluez/connection/pair_and_connect
1440+_summary: Stream audio to Bluetooth headset
1441+_purpose:
1442+ Verify that you can stream music to a Bluetooth headset via A2DP on Ubuntu
1443+ Classic. Note: Skip this test if not running Ubuntu Classic
1444+_steps:
1445+ 1. Follow the previous tests to list, pair and connect your headset
1446+ Navigate to the Sound panel in System Settings, select your headset device
1447+ in the Output tab, and make sure that Mode is set to A2DP
1448+ Then press the Test Sound button and test each speaker
1449+_verification:
1450+ Verify that you can hear the test sound "Front left", "Front right" in each
1451+ speaker respectively.
1452+
1453+id: bluez/audio/a2dp_disconnect
1454+category_id: bluez
1455+plugin: manual
1456+depends: bluez/audio/a2dp_ubuntu_classic
1457+_summary: Disconnect Bluetooth headset
1458+_purpose:
1459+ Verify that you can disconnect Bluetooth headset while streaming and audio
1460+ playback switches back to the Device Under Test's primary speaker
1461+_steps:
1462+ 1. Follow the previous tests to start streaming audio to the headset via
1463+ A2DP. Then execute the following command to disconnect the headset from
1464+ active A2DP streaming:
1465+ .
1466+ [<dut_name>]# disconnect <gadget_address>
1467+_verification:
1468+ Verify that you see output similar to the following:
1469+ Attempting to disconnect from 04:52:C7:0D:0C:03
1470+ [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
1471+ Successful disconnected
1472+ [CHG] Device 04:52:C7:0D:0C:03 Connected: no
1473+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Key: 0x0110
1474+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x40
1475+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x0c
1476+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x02
1477+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x41
1478+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x00
1479+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x61
1480+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x71
1481+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0xcd
1482+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x92
1483+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x6c
1484diff --git a/com.canonical.se:engineering-tests/units/bluez/hid.pxu b/com.canonical.se:engineering-tests/units/bluez/hid.pxu
1485new file mode 100644
1486index 0000000..394e361
1487--- /dev/null
1488+++ b/com.canonical.se:engineering-tests/units/bluez/hid.pxu
1489@@ -0,0 +1,83 @@
1490+# Copyright (C) 2017 Canonical, Ltd.
1491+# All rights reserved.
1492+#
1493+# Written by:
1494+# Matteo Croce <matteo.croce@canonical.com>
1495+
1496+id: bluez/hid/pair_and_connect_hid
1497+category_id: bluez
1498+plugin: manual
1499+depends: bluez/setup/ensure_interface_connection_setup
1500+_summary: A Bluetooth HID gadget (e.g. keyboard, mouse) is connected and paired
1501+_purpose:
1502+ Check if your Bluetooth HID gadget of choice (e.g. keyboard, mouse) can be
1503+ paired to the host system.
1504+_steps:
1505+ 1. Execute the following command to pair and connect your HID gadget to the
1506+ host system:
1507+ .
1508+ [bluetooth]# scan on
1509+ [bluetooth]# scan off
1510+ [bluetooth]# pair 01:02:03:04:05:06
1511+ [bluetooth]# connect 01:02:03:04:05:06
1512+ .
1513+_verification:
1514+ Open a text editor and make sure you can type text from the HID keyboard
1515+ into the text box. If testing a mouse, ensure that the cursor moves when
1516+ moving your HID mouse
1517+
1518+id: bluez/hid/bt_mouse_works
1519+category_id: bluez
1520+_description: Verify that Bluetooth mice do work
1521+plugin: manual
1522+depends: bluez/hid/pair_and_connect_hid
1523+_steps:
1524+ 1. Scan for a BT mouse and connect it to the DUT
1525+_verification:
1526+ 1. Verify that the paired mouse can move the pointer
1527+ 2. Verify that the device is automatically connected at boot
1528+ 3. Verify that the device is automatically connected after resume from sleep
1529+
1530+id: bluez/hid/bt_keyboard_works
1531+category_id: bluez
1532+_description: Verify that Bluetooth keyboards do work
1533+plugin: manual
1534+_steps:
1535+ 1. Scan for a BT keyboard and connect it to the DUT, eg.
1536+ .
1537+ $ bluetoothctl
1538+ [bluetooth]# scan on
1539+ [bluetooth]# scan off
1540+ [bluetooth]# pair 01:02:03:04:05:06
1541+ Pairing successful
1542+ [bluetooth]# trust 01:02:03:04:05:06
1543+ [bluetooth]# connect 01:02:03:04:05:06
1544+ Trusted
1545+_verification:
1546+ 1. Verify that the paired keyboard can write in a text editor
1547+ 2. Verify that the device is automatically connected at boot
1548+ 3. Verify that the device is automatically connected after resume from sleep
1549+ 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly
1550+
1551+id: bluez/hid/ble_mouse_works
1552+category_id: bluez
1553+_description: Verify that BLE mices do work
1554+plugin: manual
1555+_steps:
1556+ 1. Pair a BLE mouse with the DUT.
1557+_verification:
1558+ 1. Verify that the paired mouse can move the pointer
1559+ 2. Verify that the device is automatically connected at boot
1560+ 3. Verify that the device is automatically connected after resume from sleep
1561+
1562+id: bluez/hid/ble_keyboard_works
1563+category_id: bluez
1564+_description: Verify that BLE keyboards do work
1565+plugin: manual
1566+_steps:
1567+ 1. Pair a BLE keyboard with the DUT.
1568+_verification:
1569+ 1. Verify that the paired keyboard can write in a text editor
1570+ 2. Verify that the device is automatically connected at boot
1571+ 3. Verify that the device is automatically connected after resume from sleep
1572+ 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly
1573diff --git a/com.canonical.se:engineering-tests/units/bluez/setup.pxu b/com.canonical.se:engineering-tests/units/bluez/setup.pxu
1574new file mode 100644
1575index 0000000..3060426
1576--- /dev/null
1577+++ b/com.canonical.se:engineering-tests/units/bluez/setup.pxu
1578@@ -0,0 +1,140 @@
1579+# Copyright (C) 2017 Canonical, Ltd.
1580+# All rights reserved.
1581+#
1582+# Written by:
1583+# Matteo Croce <matteo.croce@canonical.com>
1584+
1585+id: bluez/setup/ensure_interface_connection_setup
1586+category_id: bluez
1587+_description: Ensure that the bluez interface is connected
1588+plugin: manual
1589+_steps:
1590+ 1. Connect required bluez slot/plug
1591+ .
1592+ $ sudo snap connect bluez:client bluez:service
1593+ .
1594+_verification:
1595+ Verify that you see the following when running snap interfaces bluez:
1596+ bluez:service bluez:client
1597+
1598+id: bluez/snap/ensure_nonroot_cannot_use
1599+category_id: bluez
1600+plugin: manual
1601+depends: bluez/setup/ensure_interface_connection_setup
1602+_summary: bluetoothctl and obexctl cannot be run as non-root user
1603+_purpose:
1604+ Verify that the bluetoothctl and obexctl commands cannot be run as non-root
1605+_steps:
1606+ 1. Start the bluetoothctl and obexctl commands as non-root user
1607+ .
1608+ $ bluetoothctl
1609+ $ obexctl
1610+ .
1611+_verification:
1612+ You should see outout similar to the following:
1613+ .
1614+ $ bluetoothctl
1615+ This script must be run as root
1616+ $ obexctl
1617+ This script must be run as root
1618+
1619+id: bluez/scan/get_all
1620+category_id: bluez
1621+plugin: manual
1622+depends: bluez/setup/ensure_interface_connection_setup
1623+_summary: All Bluetooth gadgets in range are listed
1624+_purpose:
1625+ Check if all powered on gadgets that are within range as listed.
1626+_steps:
1627+ 1. Execute the following command to retrieve the list of all Bluetooth gadgets:
1628+ .
1629+ $ /snap/bin/bluez.bluetoothctl
1630+ [bluetooth]# scan on
1631+ .
1632+_verification:
1633+ Your expected Bluetooth gadget(s) is/are shown in the output list such as:
1634+ [NEW] Device 04:52:C7:0D:0C:03 QC 35s
1635+
1636+id: bluez/connection/pair_and_connect
1637+category_id: bluez
1638+plugin: manual
1639+depends: bluez/setup/ensure_interface_connection_setup
1640+_summary: A Bluetooth gadget of choice is paired and connected
1641+_purpose:
1642+ Check if your Bluetooth gadget of choice can be paired to the host system.
1643+_steps:
1644+ 1. Execute the following command to pair and connect your gadget to the host
1645+ system using the address listed in the previous scan test:
1646+ .
1647+ [bluetooth]# pair <gadget_address>
1648+ [bluetooth]# connect <gadget_address>
1649+ .
1650+_verification:
1651+ You should see output similar to the following:
1652+ Attempting to pair with 04:52:C7:0D:0C:03
1653+ [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
1654+ [CHG] Device 04:52:C7:0D:0C:03 Modalias: bluetooth:v009Ep400Cd0106
1655+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
1656+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
1657+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
1658+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
1659+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
1660+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
1661+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
1662+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
1663+ [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
1664+ [CHG] Device 04:52:C7:0D:0C:03 Paired: yes
1665+ Pairing successful
1666+ [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
1667+ [CHG] Device 04:52:C7:0D:0C:03 Connected: no
1668+ Attempting to connect to 04:52:C7:0D:0C:03
1669+ [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
1670+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
1671+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
1672+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
1673+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
1674+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
1675+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
1676+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
1677+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
1678+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
1679+ Connection successful
1680+ [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
1681+
1682+id: bluez/snap/ensure_btmon_can_be started
1683+category_id: bluez
1684+plugin: manual
1685+depends: bluez/setup/ensure_interface_connection_setup
1686+_summary: btmon tools function
1687+_purpose:
1688+ Check that the btmon tool shipped as a part of the bluez snap can be used.
1689+_steps:
1690+ 1. Start the btmon command
1691+ .
1692+ $ sudo btmon
1693+ .
1694+_verification:
1695+ You should see outout similar to the following:
1696+ .
1697+ $ sudo btmon
1698+ Bluetooth monitor ver 5.37
1699+ = New Index: 00:1A:7D:DA:71:08 (BR/EDR,USB,hci0) [hci0] 0.626494
1700+
1701+id: bluez/snap/ensure_hcidump_can_be started
1702+category_id: bluez
1703+plugin: manual
1704+depends: bluez/setup/ensure_interface_connection_setup
1705+_summary: btmon tools works
1706+_purpose:
1707+ Check that the hcidump tool shipped as a part of the bluez snap can be used.
1708+_steps:
1709+ 1. Start the hcidump command
1710+ .
1711+ $ sudo hcidump
1712+ .
1713+_verification:
1714+ You should see outout similar to the following:
1715+ .
1716+ $ sudo hcidump
1717+ HCI sniffer - Bluetooth packet analyzer ver 5.37
1718+ device: hci0 snap_len: 1500 filter: 0xffffffff
1719diff --git a/com.canonical.se:engineering-tests/units/captive-redirect/captive-redirect.pxu b/com.canonical.se:engineering-tests/units/captive-redirect/captive-redirect.pxu
1720new file mode 100644
1721index 0000000..d45f0e6
1722--- /dev/null
1723+++ b/com.canonical.se:engineering-tests/units/captive-redirect/captive-redirect.pxu
1724@@ -0,0 +1,102 @@
1725+# Copyright (C) 2017 Canonical Ltd.
1726+# All rights reserved.
1727+#
1728+# Written by:
1729+# Matteo Croce <matteo.croce@canonical.com>
1730+
1731+unit: category
1732+id: captive_redirect
1733+_name: Captive portal redirect
1734+
1735+id: captive_redirect/setup/ensure_interface_connection_setup
1736+category_id: captive_redirect
1737+_description: Ensure that the captive-redirect interfaces are connected
1738+plugin: manual
1739+_steps:
1740+ 1. Install the captive-redirect snap via
1741+ .
1742+ $ snap install captive-redirect
1743+ .
1744+_verification:
1745+ Verify that you see the following when running snap interfaces:
1746+ :firewall-control captive-redirect
1747+
1748+id: captive_redirect/setup/default_disabled
1749+category_id: captive_redirect
1750+_description: Ensure that captive-redirect is disabled by default
1751+plugin: manual
1752+_steps:
1753+ 1. Get the configuration with:
1754+ .
1755+ $ captive-redirect.config status
1756+ .
1757+ 2. Ensure that there isn't any REDIRECT iptables chain:
1758+ .
1759+ $ sudo iptables-save |grep captive
1760+ .
1761+_verification:
1762+ 1. Check that the redirect is disabled:
1763+ .
1764+ active: false
1765+ .
1766+ 2. You shouldn't see any iptables rule
1767+
1768+id: captive_redirect/setup/iptables_rules_all_interfaces
1769+category_id: captive_redirect
1770+_description: Ensure that enabling captive-redirect sets up the correct iptables rules
1771+plugin: manual
1772+_steps:
1773+ 1. Enable captive-redirect with:
1774+ .
1775+ $ sudo snap set captive-redirect active=true port=9876
1776+ .
1777+ 2. Get the iptables rules with:
1778+ .
1779+ $ sudo iptables-save |grep captive
1780+ .
1781+_verification:
1782+ 1. You should see iptables rules like:
1783+ .
1784+ :captive - [0:0]
1785+ -A PREROUTING -j captive
1786+ -A captive -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9876
1787+ .
1788+
1789+id: captive_redirect/setup/iptables_rules_one_interface
1790+category_id: captive_redirect
1791+_description: Ensure that enabling captive-redirect sets up iptables rules for a single interface
1792+plugin: manual
1793+_steps:
1794+ 1. Enable captive-redirect with:
1795+ .
1796+ $ sudo snap set captive-redirect active=true port=9999 interfaces=tun4
1797+ .
1798+ 2. Get the iptables rules with:
1799+ .
1800+ $ sudo iptables-save |grep captive
1801+ .
1802+_verification:
1803+ 1. You should see iptables rules like:
1804+ .
1805+ :captive - [0:0]
1806+ -A PREROUTING -j captive
1807+ -A captive -i tun4 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9999
1808+ .
1809+
1810+id: captive_redirect/functionality/redirect_works
1811+category_id: captive_redirect
1812+_description: Ensure that enabling captive-redirect really redirects the traffic
1813+plugin: manual
1814+_steps:
1815+ 1. Install a sample web server with:
1816+ .
1817+ $ sudo snap install xkcd-webserver
1818+ .
1819+ 2. Connect another device to the DUT (Device Under Test) and setup the DUT as default gateway
1820+ 3. Enable the redirect with:
1821+ .
1822+ $ sudo snap set captive-redirect active=true port=80 interfaces=
1823+ .
1824+ 4. Try to access an HTTP (avoid HTTPS, it will give a certificate error) web page from the device
1825+_verification:
1826+ 1. You should see a blank page pointing to XKCD instead of the typed address
1827diff --git a/com.canonical.se:engineering-tests/units/media-hub/media-hub-snap.pxu b/com.canonical.se:engineering-tests/units/media-hub/media-hub-snap.pxu
1828new file mode 100644
1829index 0000000..24ad2bc
1830--- /dev/null
1831+++ b/com.canonical.se:engineering-tests/units/media-hub/media-hub-snap.pxu
1832@@ -0,0 +1,73 @@
1833+# Copyright (C) 2017 Canonical Ltd.
1834+# All rights reserved.
1835+#
1836+# Written by:
1837+# Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
1838+
1839+id: media_hub/snap_classic/play_wav
1840+category_id: media_hub
1841+plugin: manual
1842+_summary: Confined media-hub can play wav files
1843+_purpose:
1844+ Check if media-hub properly plays wav files when confined. The scenario is
1845+ Unity8 on Classic.
1846+_steps:
1847+ 1. Install snaps and perform needed interface connections
1848+ .
1849+ $ snap install media-hub
1850+ $ snap install --devmode mediaplayer-app
1851+ $ sudo snap connect mediaplayer-app:mpris media-hub:mpris
1852+ .
1853+ 2. Start media-hub-server (needed until LP #1613420 is solved)
1854+ .
1855+ $ media-hub.media-hub-service
1856+ .
1857+ 3. Download sample file
1858+ .
1859+ $ wget -P ~/Music/ http://freewavesamples.com/files/Kawai-K5000W-Buchla-C1.wav
1860+ .
1861+ 4. Launch mediaplayer-app
1862+ .
1863+ $ /snap/bin/mediaplayer-app ~/Music/Kawai-K5000W-Buchla-C1.wav
1864+ .
1865+ 5. Let the song play until the end
1866+ 6. Restart playback after the song finishes
1867+ 7. Pause, then press play again a few times
1868+ 8. While the song is playing, move the slider back and forth in time
1869+ 9. Pause the song, then move the slider again
1870+_verification:
1871+ Verify that in all cases the audio is played as expected.
1872+
1873+id: media_hub/snap_classic/play_mp3
1874+category_id: media_hub
1875+plugin: manual
1876+_summary: Confined media-hub can play an mp3
1877+_purpose:
1878+ Check if media-hub properly plays an mp3 when confined. The scenario is Unity8
1879+ on Classic.
1880+_steps:
1881+ 1. Install snaps and perform needed interface connections
1882+ .
1883+ $ snap install media-hub
1884+ $ snap install --devmode mediaplayer-app
1885+ $ sudo snap connect mediaplayer-app:mpris media-hub:mpris
1886+ .
1887+ 2. Start media-hub-server (needed until LP #1613420 is solved)
1888+ .
1889+ $ media-hub.media-hub-service
1890+ .
1891+ 3. Download sample file
1892+ .
1893+ $ wget -P ~/Music/ http://www.stephaniequinn.com/Music/Canon.mp3
1894+ .
1895+ 4. Launch mediaplayer-app
1896+ .
1897+ $ /snap/bin/mediaplayer-app ~/Music/Canon.mp3
1898+ .
1899+ 5. Let the song play until the end
1900+ 6. Restart playback after the song finishes
1901+ 7. Pause, then press play again a few times
1902+ 8. While the song is playing, move the slider back and forth in time
1903+ 9. Pause the song, then move the slider again
1904+_verification:
1905+ Verify that in all cases the audio is played as expected.
1906diff --git a/com.canonical.se:engineering-tests/units/media-hub/media-hub.pxu b/com.canonical.se:engineering-tests/units/media-hub/media-hub.pxu
1907new file mode 100644
1908index 0000000..bdeec69
1909--- /dev/null
1910+++ b/com.canonical.se:engineering-tests/units/media-hub/media-hub.pxu
1911@@ -0,0 +1,65 @@
1912+# Copyright 2017 Canonical Ltd.
1913+# All rights reserved.
1914+#
1915+# Written by:
1916+# Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
1917+
1918+unit: category
1919+id: media_hub
1920+_name: media-hub
1921+
1922+id: media_hub/video/play_h264
1923+category_id: media_hub
1924+plugin: manual
1925+_summary: H.264 videos play as expected
1926+_purpose:
1927+ Check if media-hub plays properly H.264 videos
1928+_steps:
1929+ 1. Download H.264 video
1930+ .
1931+ $ wget https://download.blender.org/durian/trailer/sintel_trailer-720p.mp4
1932+ .
1933+ 2. Start media-hub-server
1934+ .
1935+ $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
1936+ .
1937+ 3. Start to play the video
1938+ .
1939+ $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 sintel_trailer-720p.mp4
1940+ .
1941+ 4. Let the video play until the end
1942+ 5. Re-start after the video finishes
1943+ 6. Pause, then press play again a few times
1944+ 7. While the video is playing, move the slider back and forth in time
1945+ 8. Pause the video, then move the slider again
1946+ 9. Re-size, maximize, then minimize the window several times
1947+_verification:
1948+ Verify that in all cases the video is played as expected.
1949+
1950+id: media_hub/video/play_mpeg4
1951+category_id: media_hub
1952+plugin: manual
1953+_summary: MPEG4 videos play as expected
1954+_purpose:
1955+ Check if media-hub plays properly MPEG4 videos
1956+_steps:
1957+ 1. Download H.264 video
1958+ .
1959+ $ wget https://download.blender.org/durian/trailer/Sintel_Trailer.480p.DivX_Home_Theater.divx
1960+ .
1961+ 2. Start media-hub-server
1962+ .
1963+ $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
1964+ .
1965+ 3. Start to play the video
1966+ .
1967+ $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 Sintel_Trailer.480p.DivX_Home_Theater.divx
1968+ .
1969+ 4. Let the video play until the end
1970+ 5. Re-start after the video finishes
1971+ 6. Pause, then press play again a few times
1972+ 7. While the video is playing, move the slider back and forth in time
1973+ 8. Pause the video, then move the slider again
1974+ 9. Re-size, maximize, then minimize the window several times
1975+_verification:
1976+ Verify that in all cases the video is played as expected.
1977diff --git a/com.canonical.se:engineering-tests/units/modem-manager/modem-manager.pxu b/com.canonical.se:engineering-tests/units/modem-manager/modem-manager.pxu
1978new file mode 100644
1979index 0000000..3912ac2
1980--- /dev/null
1981+++ b/com.canonical.se:engineering-tests/units/modem-manager/modem-manager.pxu
1982@@ -0,0 +1,103 @@
1983+# Copyright 2016 Canonical Ltd.
1984+# All rights reserved.
1985+#
1986+# Written by:
1987+# Jim Hodapp <jim.hodapp@canonical.com>
1988+# Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
1989+
1990+unit: category
1991+id: modem_manager
1992+_name: Modem Manager
1993+
1994+id: modem_manager/setup/ensure_interface_connection_setup
1995+category_id: modem_manager
1996+_description: Ensure that the modem-manager interface is connected
1997+plugin: manual
1998+_steps:
1999+ 1. Install network-manager if not already installed
2000+ .
2001+ $ sudo snap install network-manager
2002+ .
2003+ 2. Connect required modem-manager/network-manager slots/plugs
2004+ .
2005+ $ sudo snap connect modem-manager:mmcli modem-manager:service
2006+ $ sudo snap connect network-manager:nmcli network-manager:service
2007+ $ sudo snap connect network-manager:modem-manager modem-manager:service
2008+ $ sudo snap connect network-manager:ppp ubuntu-core:ppp
2009+ .
2010+_verification:
2011+ Verify that you see the following when running snap interfaces:
2012+ modem-manager:service modem-manager:mmcli,network-manager:modem-manager
2013+ network-manager:service network-manager:nmcli
2014+ :ppp network-manager
2015+
2016+id: modem_manager/modems/get_all
2017+category_id: modem_manager
2018+plugin: manual
2019+depends: modem_manager/setup/ensure_interface_connection_setup
2020+_summary: All active modem configuration items are listed
2021+_purpose:
2022+ Check if the modem shows up as being recognized by modem-manager.
2023+_steps:
2024+ 1. Execute the following command to retrieve the list of all detected modems:
2025+ .
2026+ $ sudo mmcli -L
2027+_verification:
2028+ Your expected modem is shown in the output list.
2029+
2030+id: modem_manager/modems/get_info
2031+category_id: modem_manager
2032+plugin: manual
2033+depends: modem_manager/setup/ensure_interface_connection_setup
2034+_summary: All modem information listed
2035+_purpose:
2036+ Check if the modem details can be listed.
2037+_steps:
2038+ 1. Execute the following command to retrieve the list of all detected modems.
2039+ Note, the modem number is listed from the previous test:
2040+ .
2041+ $ sudo mmcli -m <modem_number>
2042+_verification:
2043+ Your desired modem detail is listed.
2044+
2045+id: modem_manager/modems/connect
2046+category_id: modem_manager
2047+plugin: manual
2048+depends: modem_manager/setup/ensure_interface_connection_setup
2049+_summary: Connect to a listed modem
2050+_purpose:
2051+ Connect to a listed modem and verify connection status
2052+_steps:
2053+ 1. Execute the following commands to connect to a particular modem. First run
2054+ "sudo nmcli d" to find out what you need to put in <interface> (look for
2055+ TYPE=gsm, the interface will be the name in the DEVICE column). It will
2056+ probably be something that starts with "tty" or "cdc". Also, replace
2057+ <op_apn> by looking up the APN string for your cell provider at
2058+ http://www.apn-settings.com (e.g. "fast.t-mobile.com" for T-Mobile 4G).
2059+ Finally, "gsmconn" is an arbitrary connection name and can be set to
2060+ anything that makes sense for the connection type.
2061+ .
2062+ $ sudo nmcli c add type gsm ifname <interface> con-name gsmconn apn <op_apn>
2063+ $ sudo nmcli r wwan on
2064+ .
2065+ 2. Check that the connection is up with "sudo nmcli d". It should show that
2066+ state is "connected". This can take some time depending on network
2067+ conditions and on the modem type.
2068+ .
2069+ 3. Check which is the network interface for the cellular connection. For this,
2070+ fist run
2071+ .
2072+ $ sudo nmcli d show <interface>
2073+ .
2074+ (here <interface> is the one from point 1), check the IP4.ADDRESS field,
2075+ then run
2076+ .
2077+ $ ip address
2078+ .
2079+ and there you can find the network interface that owns that address.
2080+ .
2081+ 4. Add a route to 8.8.8.8 with
2082+ .
2083+ $ sudo ip route add 8.8.8.8 dev <network-interface>
2084+_verification:
2085+ Verify that you have a modem connection by pinging 8.8.8.8.
2086diff --git a/com.canonical.se:engineering-tests/units/network-manager/network-manager.pxu b/com.canonical.se:engineering-tests/units/network-manager/network-manager.pxu
2087new file mode 100644
2088index 0000000..27d9b8b
2089--- /dev/null
2090+++ b/com.canonical.se:engineering-tests/units/network-manager/network-manager.pxu
2091@@ -0,0 +1,325 @@
2092+# Copyright 2016 Canonical Ltd.
2093+# All rights reserved.
2094+#
2095+# Written by:
2096+# Lorn Potter <lorn.potter@canonical.com>
2097+# Simon Fels <simon.fels@canonical.com>
2098+
2099+unit: category
2100+id: network_manager
2101+_name: Network Manager
2102+
2103+id: network_manager/misc/check_for_crashes
2104+category_id: network_manager
2105+plugin: manual
2106+_summary: Verify that NetworkManager hasn't crashed in previous runs.
2107+_steps:
2108+ 1. Power on a Desktop system, this tests does not apply elsewhere.
2109+ 2. List content of /var/crash for crash dumps:
2110+ .
2111+ ls -l /var/crash
2112+ .
2113+_verification:
2114+ 1. Check that /var/crash is empty.
2115+
2116+id: network_manager/ethernet/enable_support
2117+category_id: network_manager
2118+plugin: manual
2119+_summary: Ethernet support for NetworkManager needs to be manually enabled
2120+_purpose:
2121+ By default ethernet support is disabled in the network-manager snap. In order
2122+ to be able to get it managed through NetworkManager a few manual steps need to
2123+ be performed.
2124+_steps:
2125+ 1. Create /etc/netplan/00-default-nm-renderer.yaml with the following content:
2126+ .
2127+ network:
2128+ renderer: NetworkManager
2129+ .
2130+ 2. Drop any other files from /etc/netplan and reboot the device.
2131+_verification:
2132+ NOTE: The device may get another IP address assigned as before. Use a network
2133+ scanner or a monitor+keyboard to check which IP address it got assigned.
2134+ .
2135+ Once the device is rebooted you should be able to connect to it by using the
2136+ network connection offered on the ethernet port. When logged into the device
2137+ verify NetworkManager automatically connected the ethernet port:
2138+ .
2139+ $ network-manager.nmcli d
2140+ DEVICE TYPE STATE CONNECTION
2141+ eth0 ethernet connected eth0
2142+ [...]
2143+ .
2144+ The state of all ethernet devices with a plugged cable and a working network
2145+ behind should be 'connected'.
2146+
2147+id: network_manager/ethernet/all_ports_detected
2148+depends: network_manager/ethernet/enable_support
2149+category_id: network_manager
2150+plugin: manual
2151+_summary: NetworkManager should detect all available ethernet ports
2152+_purpose:
2153+ NetworkManager should detect all available ethernet ports by default
2154+ on a system and list them as usable devices.
2155+_steps:
2156+ 1. List all available ethernet ports
2157+ $ ifconfig -a | grep -E '$eth'
2158+ $ ifconfig -a | grep -E '$en'
2159+ 2. List all ethernet ports NetworkManager knows about
2160+ $ network-manager.nmcli d
2161+_verification:
2162+ Both steps should show the same list of ethernet network interfaces.
2163+
2164+id: network_manager/ethernet/auto_connected
2165+depends: network_manager/ethernet/enable_support
2166+category_id: network_manager
2167+plugin: manual
2168+_summary: NetworkManager should auto-connect any ethernet port with a link
2169+_purpose:
2170+ When a cable is plugged into an ethernet port NetworkManager should try
2171+ to automatically connect the port.
2172+ .
2173+ NOTE: This test assumes that the cable you plug into the port is connected
2174+ to a network which offers a DHCP server.
2175+_steps:
2176+ 1. Ensure that there is no connection for the port you want to use for
2177+ testing. Using a serial console to perform this test is recommended.
2178+ 2. Drop any existing connections listed by
2179+ $ network-manager.nmcli c show
2180+ which are meant for the ethernet port of the device with
2181+ $ network-manager.nmcli c delete <UUID>
2182+ 3. Plug the cable into the ethernet port.
2183+_verification:
2184+ The ethernet port should be automatically connected by NetworkManager. This
2185+ can be verified with
2186+ $ network-manager.nmcli d | grep <ethernet device name>
2187+ eth0 ethernet connected <connection name>
2188+ Please note that the <connection name> can be different as its
2189+ automatically selected by NetworkManager. It can be "Wired Connection 1"
2190+ for example.
2191+
2192+id: network_manager/ethernet/auto_connect_existing_connection
2193+depends: network_manager/ethernet/enable_support
2194+category_id: network_manager
2195+plugin: manual
2196+_summary: Cable plug/unplug should give an existing connection
2197+_purpose:
2198+ When a cable is unplugged and plugged again the ethernet port should
2199+ be automatically reconnected.
2200+_steps:
2201+ 1. Check if the ethernet port is currently connected
2202+ $ network-manager.nmcli d
2203+ 2. Unplug the cable from the ethernet port and check the connection
2204+ $ network-manager.nmcli d
2205+ 3. Plug the cable again and check the connection status.
2206+_verification:
2207+ Before the cable is unplugged the ethernet port should be marked
2208+ as connected. Once the cable is removed the connection status
2209+ should switch to unconnected. When plugged back in, it should be marked
2210+ again as connected.
2211+
2212+id: network_manager/ethernet/unmanaged
2213+category_id: network_manager
2214+plugin: manual
2215+depends: network_manager/ethernet/auto_connected
2216+_summary: Check if ethernet device is unmanaged.
2217+_purpose:
2218+ Check if the ethernet device is not managed by Network Manager.
2219+ .
2220+ NOTE: This only applies to devices where ethernet is not managed by
2221+ NetworkManager. Check if /etc/netplan/00-default-nm-renderer.yaml
2222+ exists. If it does not, then NetworkManager doesn't touch any
2223+ ethernet connection. If it exists, skip this test.
2224+_steps:
2225+ 1. Execute the following command to retrieve the list of all detected connections.
2226+ Note, the AP number is listed from the previous test:
2227+ .
2228+ $ /snap/bin/network-manager.nmcli d | grep en
2229+_verification:
2230+ The network device is listed as 'unmanaged', as an example:
2231+ enxb827ebf6b919 ethernet unmanaged --
2232+
2233+id: network_manager/connections/get_all
2234+category_id: network_manager
2235+plugin: manual
2236+depends: network_manager/ethernet/auto_connected
2237+_summary: All active AP configuration items are listed
2238+_purpose:
2239+ Check if the AP shows up as being recognized by Network Manager.
2240+_steps:
2241+ 1. Execute the following command to retrieve the list of all detected connections:
2242+ .
2243+ $ /snap/bin/network-manager.nmcli d wifi list
2244+_verification:
2245+ Your expected AP is shown in the output list for example:
2246+ pool1 Infra 6 54 Mbit/s 75 *** WPA2
2247+
2248+id: network_manager/connections/agent
2249+category_id: network_manager
2250+plugin: manual
2251+depends: network_manager/ethernet/auto_connected
2252+_summary: Register for secret agent
2253+_purpose:
2254+ Register for Network Manager's secret agent and verify status
2255+_steps:
2256+ 1. Execute the following command to register secret agent:
2257+ .
2258+ $ /snap/bin/network-manager.nmcli a
2259+_verification:
2260+ Output should be similiar to this:
2261+ nmcli successfully registered as a Network Manager's secret agent.
2262+ nmcli successfully registered as a polkit agent.
2263+
2264+id: network_manager/connections/connect
2265+category_id: network_manager
2266+plugin: manual
2267+depends: network_manager/ethernet/auto_connected
2268+_summary: Connect to a listed AP
2269+_purpose:
2270+ Connect to a listed AP and verify connection status
2271+_steps:
2272+ 1. Execute the following commands to connect to a particular AP.
2273+ .
2274+ $ /snap/bin/network-manager.nmcli dev wifi con "yourssid" password "yourpassword"
2275+ Note, replace yourssid with the ssid if the AP you will connect to, and replace yourpassword
2276+ with the actual password/passphrase.
2277+_verification:
2278+ Verify that you have a AP connection by issuing this command:
2279+ $ ifconfig | grep -A 2 wl
2280+ .
2281+ verifying that the interface has an IP address with output similiar to this:
2282+ wlp5s0 Link encap:Ethernet HWaddr 70:77:81:33:92:6b
2283+ inet addr:10.0.0.108 Bcast:10.0.0.255 Mask:255.255.255.0
2284+ inet6 addr: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64 Scope:Global
2285+
2286+id: network_manager/connections/get_info
2287+category_id: network_manager
2288+plugin: manual
2289+depends: network_manager/ethernet/auto_connected
2290+_summary: All AP information listed
2291+_purpose:
2292+ Check if the AP details can be listed.
2293+_steps:
2294+ 1. Execute the following command to retrieve the list of all detected connections.
2295+ Note, the AP ssid is listed from the previous test:
2296+ .
2297+ $ /snap/bin/network-manager.nmcli -p -f general,ip4,ip6 c show <AP_SSID>
2298+_verification:
2299+ Your desired AP detail is listed and has ip4/ip6 address.
2300+ ===============================================================================
2301+ Activate connection details (1554e3b2-76e6-4adc-b986-215b7393f8d9)
2302+ ===============================================================================
2303+ GENERAL.NAME: pool1
2304+ GENERAL.UUID: 1554e3b2-76e6-4adc-b986-215b7393f8d9
2305+ GENERAL.DEVICES: wlp5s0
2306+ GENERAL.STATE: activated
2307+ GENERAL.DEFAULT: no
2308+ GENERAL.DEFAULT6: no
2309+ GENERAL.VPN: no
2310+ GENERAL.ZONE: --
2311+ GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
2312+ GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/3
2313+ GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/0
2314+ GENERAL.MASTER-PATH: --
2315+ -------------------------------------------------------------------------------
2316+ IP4.ADDRESS[1]: 10.0.0.108/24
2317+ IP4.GATEWAY: 10.0.0.138
2318+ IP4.DNS[1]: 10.0.0.138
2319+ IP4.DOMAIN[1]: gateway
2320+ -------------------------------------------------------------------------------
2321+ IP6.ADDRESS[1]: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64
2322+ IP6.ADDRESS[2]: 2001:8003:6501:2000:7277:81ff:fe33:926b/64
2323+ IP6.ADDRESS[3]: fe80::7277:81ff:fe33:926b/64
2324+ IP6.GATEWAY: fe80::e2b9:e5ff:fe5a:91b0
2325+ IP6.DNS[1]: 2001:8003:6501:2000::1
2326+ IP6.DOMAIN[1]: gateway
2327+ -------------------------------------------------------------------------------
2328+
2329+id: network_manager/ethernet/device_supports_wol
2330+depends: network_manager/ethernet/enable_support
2331+category_id: network_manager
2332+plugin: manual
2333+_summary: Verify that the device under test has support for Wake-on-LAN
2334+_purpose:
2335+ Verify that the device you're running the tests on supports Wake-on-LAN. For
2336+ example, devices like the Raspberry PI (1-3) do not support Wake-on-LAN.
2337+_steps:
2338+ Verify that your device supports Wake-on-LAN. You can look into the specs
2339+ for your device, ask the vendor or search through the internet.
2340+ .
2341+ For example the Raspberry PI can't suspend to RAM which is discussed and
2342+ outlined in https://github.com/raspberrypi/linux/issues/1281 which also
2343+ makes Wake-on-LAN impossible.
2344+_verification:
2345+ If device does not support Wake-on-LAN please SKIP this test case and all
2346+ depending test cases will be skipped too. If Wake-on-LAN is supported mark
2347+ test as PASSED.
2348+
2349+id: network_manager/ethernet/uses_global_wol
2350+depends: network_manager/ethernet/device_supports_wol
2351+category_id: network_manager
2352+plugin: manual
2353+_summary: Ethernet connections are using global wake-on-lan setting
2354+_purpose:
2355+ Check if an ethernet connection created by NetworkManager automatically uses the
2356+ global default for wake-on-lan.
2357+ .
2358+ NOTE: This requires a system which is configured to not use netplan to
2359+ generate connections for NetworkManager. On such a system an ethernet
2360+ connection will always have wake-on-lan disabled as netplan does this
2361+ by default if not explicitly stated in the netplan configuration.
2362+_steps:
2363+ 1. Find connection UUID for the ethernet port
2364+ $ network-manager.nmcli c show | grep eth0
2365+ 2. Verify the connection uses the global wake-on-lan setting
2366+ $ network-manager.nmcli -m multiline -f 802-3-ethernet.wake-on-lan c show <UUID>
2367+_verification:
2368+ The output should look like this:
2369+ .
2370+ 802-3-ethernet.wake-on-lan: 1 (default)
2371+
2372+id: network_manager/ethernet/has_wol_enabled_by_default
2373+depends: network_manager/ethernet/device_supports_wol
2374+category_id: network_manager
2375+plugin: manual
2376+_summary: Ethernet port has wake-on-lan enabled by default
2377+_purpose:
2378+ Check if the actual ethernet device has wake-on-lan correctly enabled when
2379+ its connection is maintained by NetworkManager.
2380+_steps:
2381+ 1. Install the se-test-tools snap
2382+ $ snap install --devmode --edge se-test-tools
2383+ 2. Check the ethernet port for the wake-on-lan setting (eth0 in this case)
2384+ $ sudo se-test-tools.ethtool eth0
2385+_verification:
2386+ The output should be similar to this:
2387+ Settings for eth0:
2388+ [...]
2389+ Supports Wake-on: pumbg
2390+ Wake-on: g
2391+ [...]
2392+ .
2393+ The relevant line is the "Wake-on:" one. It should have the value "g"
2394+ set which marks the port as waking up on the magic packet.
2395+
2396+id: network_manager/ethernet/wakes_up_with_wol
2397+depends: network_manager/ethernet/device_supports_wol
2398+category_id: network_manager
2399+plugin: manual
2400+_summary: Wake on LAN configured by NetworkManager can wake up the device
2401+_purpose:
2402+ Check that another system can wake up from S5 the SUT using the connected ethernet port.
2403+_steps:
2404+ 1. Ensure there is an ethernet cable attached to one of the ports and it's configured via
2405+ NetworkManager. Check with
2406+ $ network-manager.nmcli d | grep eth0
2407+ 2. Note the MAC address of the the eth0 port
2408+ $ ifconfig eth0
2409+ 3. Power off the system by running
2410+ $ sudo poweroff
2411+ 4. From another computer on the same network run the following command:
2412+ $ wakeonlan {mac}
2413+ If wakeonlan tool is not installed run:
2414+ $ sudo apt install wakeonlan
2415+_verification:
2416+ Did the SUT wake up from S5?
2417diff --git a/com.canonical.se:engineering-tests/units/network-manager/power_management.pxu b/com.canonical.se:engineering-tests/units/network-manager/power_management.pxu
2418new file mode 100644
2419index 0000000..8ae9b78
2420--- /dev/null
2421+++ b/com.canonical.se:engineering-tests/units/network-manager/power_management.pxu
2422@@ -0,0 +1,31 @@
2423+# Copyright 2016 Canonical Ltd.
2424+# All rights reserved.
2425+#
2426+# Written by:
2427+# Simon Fels <simon.fels@canonical.com>
2428+
2429+id: network_manager/power_management/connections_come_back_after_resume
2430+category_id: network_manager
2431+plugin: manual
2432+_summary: Connections managed by NetworkManager should come back when device wakes up
2433+_purpose:
2434+ When a device goes to sleep NetworkManager disconnects all connections but
2435+ will reconnect them back when the device reawakens.
2436+_steps:
2437+ 1. Verify the device is connectd to a WiFi or ethernet network. You can use
2438+ .
2439+ $ network-manager.nmcli d
2440+ .
2441+ to check if a wireless network interface is connected or not.
2442+ 2. Suspend the device by calling
2443+ .
2444+ $ systemctl suspend
2445+ .
2446+ 3. Wake up the device again by pressing its power button
2447+_verification:
2448+ When the device comes back from suspend after pressing the power button
2449+ verify with
2450+ .
2451+ $ network-manager.nmcli d
2452+ .
2453+ that the previously connected WiFi/ethernet network is again connected.
2454diff --git a/com.canonical.se:engineering-tests/units/network-manager/snap.pxu b/com.canonical.se:engineering-tests/units/network-manager/snap.pxu
2455new file mode 100644
2456index 0000000..419901a
2457--- /dev/null
2458+++ b/com.canonical.se:engineering-tests/units/network-manager/snap.pxu
2459@@ -0,0 +1,101 @@
2460+# Copyright 2017 Canonical Ltd.
2461+# All rights reserved.
2462+#
2463+# Written by:
2464+# Matteo Croce <matteo.croce@canonical.com>
2465+
2466+id: network_manager/snap/check_interfaces
2467+category_id: network_manager
2468+plugin: manual
2469+_summary: Verify that snap interfaces are correctly connected
2470+_steps:
2471+ 1. Install the snap from the store:
2472+ .
2473+ $ snap install network-manager
2474+ .
2475+_verification:
2476+ 1. Verify that the 'network-manager' snap has all required plug connected:
2477+ .
2478+ $ snap interfaces |grep network-manager
2479+ :network-setup-observe network-manager
2480+ :ppp network-manager
2481+ modem-manager:service modem-manager:mmcli,network-manager:modem-manager
2482+ network-manager:service network-manager:nmcli
2483+ .
2484+
2485+id: network_manager/wifi/periodic_scanning
2486+category_id: network_manager
2487+depends: network_manager/snap/check_interfaces
2488+plugin: manual
2489+_summary: Verify that periodic Wi-Fi scanning occurs
2490+_steps:
2491+ 1. Run wpa_cli to ensure that periodic scanning is occurring:
2492+ .
2493+ $ sudo wpa_cli
2494+ wpa_cli v2.4
2495+ .
2496+ Selected interface 'wlp3s0'
2497+ .
2498+ Interactive mode
2499+ .
2500+ .
2501+ 2. Get the scan results with:
2502+ .
2503+ > scan_results
2504+ .
2505+_verification:
2506+ 1. You should see some output like this at least once every 120 seconds
2507+ in the wpa_cli output
2508+ .
2509+ <3>CTRL-EVENT-SCAN-STARTED
2510+ <3>CTRL-EVENT-SCAN-RESULTS
2511+ .
2512+ 2. You should see the list of reachable Access Points, eg.
2513+ .
2514+ bssid / frequency / signal level / flags / ssid
2515+ 12:34:56:78:89:ab 2437 -85 [WPA2-PSK-CCMP+TKIP][ESS] Home-AP
2516+
2517+
2518+id: network_manager/wifi/no_dbus_duplicate_signals
2519+category_id: network_manager
2520+depends: network_manager/snap/check_interfaces
2521+plugin: manual
2522+_summary: Ensure that dbus signals aren't duplicated
2523+_steps:
2524+ 1. Run dbus-monitor:
2525+ .
2526+ dbus-monitor --system --profile type=signal,interface=org.freedesktop.DBus.Properties
2527+ .
2528+_verification:
2529+ 1. Ensure that when scanning occurs, there aren't duplicate PropertiesChanged
2530+ signals sent for each AccessPoint object path.
2531+ There should be a single DBus PropertiesChanged signal for each /AccessPoint/X):
2532+ .
2533+ sig 1489573828 1805 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/0 org.freedesktop.DBus.Properties PropertiesChanged
2534+ sig 1489573828 1806 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/1 org.freedesktop.DBus.Properties PropertiesChanged
2535+ sig 1489573828 1807 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/2 org.freedesktop.DBus.Properties PropertiesChanged
2536+ sig 1489573828 1808 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/3 org.freedesktop.DBus.Properties PropertiesChanged
2537+ sig 1489573828 1809 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/4 org.freedesktop.DBus.Properties PropertiesChanged
2538+
2539+
2540+id: network_manager/wifi/ap_expires
2541+category_id: network_manager
2542+depends: network_manager/snap/check_interfaces
2543+plugin: manual
2544+_summary: Ensure that AccessPoint entries are volatile
2545+_steps:
2546+ 1. Bring up an AP (eg. from a smartphone)
2547+ 2. Start wpa_cli and do a wireless scan:
2548+ .
2549+ $ wpa_cli
2550+ > scan
2551+ .
2552+ wait 10 seconds, and get the scan results.
2553+ .
2554+ > scan_results
2555+ .
2556+ 3. Shutdown the AP on the smartphone
2557+ 4. Wait 120 seconds
2558+ 5. Retry the wireless scan
2559+_verification:
2560+ 1. In the second scan the smartphone AP should not be present
2561diff --git a/com.canonical.se:engineering-tests/units/network-manager/wireless.pxu b/com.canonical.se:engineering-tests/units/network-manager/wireless.pxu
2562new file mode 100644
2563index 0000000..52a84d2
2564--- /dev/null
2565+++ b/com.canonical.se:engineering-tests/units/network-manager/wireless.pxu
2566@@ -0,0 +1,54 @@
2567+# Copyright 2016 Canonical Ltd.
2568+# All rights reserved.
2569+#
2570+# Written by:
2571+# Simon Fels <simon.fels@canonical.com>
2572+
2573+id: network_manager/wireless/powersave_off_by_default
2574+category_id: network_manager
2575+plugin: manual
2576+_summary: NetworkManager should disable powersave by default
2577+_purpose:
2578+ The powersave configuration option should cause the mode on the
2579+ actual hardware device to be turned off by default.
2580+_steps:
2581+ Install wireless-tools snap and check that powersave is turned off
2582+ on the actual hardware wireless device.
2583+ $ snap install wireless-tools
2584+_verification:
2585+ The iw utility should return the following for the selected wireless device
2586+ $ sudo wireless-tools.iw dev wlan0 get power_save
2587+ Power save: off
2588+
2589+id: network_manager/wireless/powersave_config_default_off
2590+category_id: network_manager
2591+plugin: manual
2592+_summary:
2593+ The configuration option should be set to disable by default
2594+_purpose:
2595+ On installation the snap sets the option to a default value
2596+ which should always be the same.
2597+_steps:
2598+ Retrieve the configuration value via
2599+ $ snap get network-manager wifi.powersave
2600+_verification:
2601+ The returned value should be "disable".
2602+
2603+id: network_manager/wireless/powersave_can_be_enabled
2604+category_id: network_manager
2605+plugin: manual
2606+_summary:
2607+ Enabling powersave with the configuration option of the snap should turn it on.
2608+_purpose:
2609+ The network-manager snap uses a configure hook to control how
2610+ the WiFi powersave option is set. It should be possible to enable
2611+ the option on the actual hardware wireless device with it.
2612+_steps:
2613+ 1. Enable powersave via the configure hook
2614+ $ snap set network-manager wifi.powersave=enable
2615+_verification:
2616+ Powersave should now be turned on for all wireless devices. This
2617+ can be verified with
2618+ $ snap install wireless-tools
2619+ $ sudo wireless-tools.iw dev wlan0 get power_save
2620+ Power save: on
2621diff --git a/com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu b/com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu
2622new file mode 100644
2623index 0000000..43af155
2624--- /dev/null
2625+++ b/com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu
2626@@ -0,0 +1,106 @@
2627+# Copyright 2016 Canonical Ltd.
2628+# All rights reserved.
2629+#
2630+# Written by:
2631+# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
2632+
2633+unit: category
2634+id: pulseaudio
2635+_name: PulseAudio
2636+
2637+id: pulseaudio/setup/ensure_interface_connection_setup
2638+category_id: pulseaudio
2639+_description: Ensure that the pulseaudio interface is auto-connected
2640+plugin: manual
2641+_steps:
2642+ 1. List the interfaces
2643+ .
2644+ $ snap interfaces
2645+ .
2646+_verification:
2647+ Verify that you see the following:
2648+ pulseaudio:service pulseaudio:client
2649+ :network pulseaudio
2650+
2651+id: pulseaudio/pactl/ensure-commands-can-be-run-by-root
2652+category_id: pulseaudio
2653+_description: Ensure that the pulseaudio commands can be run only by root
2654+plugin: manual
2655+depends: pulseaudio/setup/ensure_interface_connection_setup
2656+_steps:
2657+ 1. Try to run pactl
2658+ .
2659+ $ pulseaudio.pactl
2660+ .
2661+ 2. Try to run paplay
2662+ .
2663+ $ pulseaudio.paplay
2664+ .
2665+ 3. Try to run parec
2666+ .
2667+ $ pulseaudio.parec
2668+ .
2669+_verification:
2670+ Verify that each step ends with the following message:
2671+ This script must be run as root
2672+
2673+id: pulseaudio/pactl/ensure-modules-are-listed
2674+category_id: pulseaudio
2675+_description: Ensure that the correct modules are loaded
2676+plugin: manual
2677+depends: pulseaudio/setup/ensure_interface_connection_setup
2678+_steps:
2679+ 1. List the loaded modules
2680+ .
2681+ $ sudo pulseaudio.pactl list short
2682+ .
2683+_verification:
2684+ Verify that you see output similar to following:
2685+ 0 module-device-restore
2686+ 1 module-stream-restore
2687+ 2 module-card-restore
2688+ 3 module-augment-properties
2689+ 4 module-switch-on-port-available
2690+ 5 module-udev-detect
2691+ ...
2692+ 80 protocol-native.c pactl
2693+ 0 alsa_card.pci-0000_00_1b.0 module-alsa-card.c
2694+ .
2695+ Verify that amongs the other the following modules are listed:
2696+ module-device-restore
2697+ module-stream-restore
2698+ module-card-restore
2699+ module-switch-on-port-available
2700+ module-rescue-streams
2701+ module-always-sink
2702+
2703+id: pulseaudio/parecord/ensure-audio-can-be-recorded
2704+category_id: pulseaudio
2705+_description: Ensure that it is possible to record audio
2706+plugin: manual
2707+depends: pulseaudio/setup/ensure_interface_connection_setup
2708+_steps:
2709+ 1. Record an audio .wav file
2710+ .
2711+ $ sudo pulseaudio.parec ~/record.wav
2712+ .
2713+_verification:
2714+ Verify that the record.wav file has been created and it's size is
2715+ greater than zero. Verify that the recorded file can be played and
2716+ it is possible to hear the audio.
2717+
2718+id: pulseaudio/paplay/ensure-audio-can-be-played
2719+category_id: pulseaudio
2720+_description: Ensure that it is possible to play auio files
2721+plugin: manual
2722+depends: pulseaudio/setup/ensure_interface_connection_setup
2723+_steps:
2724+ 1. Play an audio .wav file
2725+ .
2726+ $ sudo pulseaudio.paplay ~/file.wav
2727+ .
2728+_verification:
2729+ Verify that the audio is hearable through the speakers. In case the
2730+ speakers are not available verify that the sink status has changed
2731+ from SUSPEND to RUNNING [use the sudo pulseaudio.pactl list sinks
2732+ command for that]
2733diff --git a/com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu b/com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu
2734new file mode 100644
2735index 0000000..8f9e070
2736--- /dev/null
2737+++ b/com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu
2738@@ -0,0 +1,182 @@
2739+# Copyright 2017 Canonical Ltd.
2740+# All rights reserved.
2741+#
2742+# Written by:
2743+# Roberto Mier Escandon <roberto.escandon@canonical.com>
2744+
2745+unit: category
2746+id: snapweb
2747+_name: SnapWeb
2748+
2749+id: snapweb/setup/ensure_interface_connection_setup
2750+category_id: snapweb
2751+_description: Ensure that the snapweb interfaces are auto-connected
2752+plugin: manual
2753+_steps:
2754+ 1. List the interfaces
2755+ .
2756+ $ snap interfaces snapweb
2757+ .
2758+_verification:
2759+ Verify that you see the following:
2760+ Slot Plug
2761+ :network snapweb
2762+ :network-bind snapweb
2763+ :snapd-control snapweb
2764+ :timeserver-control snapweb
2765+
2766+id: snapweb/setup/ensure-http-service-is-up
2767+category_id: snapweb
2768+_description: Ensure that the http interface is up and running
2769+plugin: manual
2770+depends: snapweb/setup/ensure_interface_connection_setup
2771+_steps:
2772+ 1. Open a browser in same device and type in address bar:
2773+ .
2774+ http://localhost:4200
2775+ .
2776+_verification:
2777+ Verify that url is accessible and a warning is shown about web access is
2778+ not secure/private (depending on the browser)
2779+
2780+id: snapweb/setup/ensure-https-service-is-up
2781+category_id: snapweb
2782+_description: Ensure that the snapweb web interface is up and running
2783+plugin: manual
2784+depends: snapweb/setup/ensure-http-service-is-up
2785+_steps:
2786+ 1. Open a browser in same device and type in address bar:
2787+ .
2788+ http://localhost:4200
2789+ .
2790+ 2. After warning alert showing that web access is not secure/private,
2791+ proceed to access localhost. In some browsers it is needed to confirm
2792+ a security exception.
2793+_verification:
2794+ Verify that url is accessible and browser shows a page with title
2795+ 'Access Control', requesting a Snapweb Access Token to continue.
2796+ Verify that url address is now https://localhost:4201/access-control
2797+
2798+id: snapweb/setup/ensure-web-service-is-accessible-from-lan
2799+category_id: snapweb
2800+_description: Ensure that the snapweb web interface is accessible from lan
2801+plugin: manual
2802+depends: snapweb/setup/ensure-https-service-is-up
2803+_steps:
2804+ 1. Open a browser in other device connected to same LAN than the one
2805+ hosting snapweb and type in address bar:
2806+ .
2807+ http://[hostname]:4200
2808+ .
2809+ 2. After warning alert showing that web access is not secure/private,
2810+ proceed to access localhost. In some browsers it is needed to confirm
2811+ a security exception.
2812+_verification:
2813+ Verify that url is accessible and browser shows a page with title
2814+ 'Access Control', requesting a Snapweb Access Token to continue.
2815+ Verify that url address is now https://[hostname]:4201/access-control
2816+
2817+id: snapweb/setup/ensure-token-access
2818+category_id: snapweb
2819+_description: Ensure ui allows access when entered a valid token generated from cli
2820+plugin: manual
2821+depends: snapweb/setup/ensure-https-service-is-up
2822+_steps:
2823+ 1. Reboot the device. This step is only needed to be done just after
2824+ first installation. If snap was previously installed and this is
2825+ an update, you can go to step 2.
2826+ 2. Open a terminal in the device and type:
2827+ .
2828+ $ sudo snapweb.generate-token
2829+ .
2830+ 3. Copy result token to clipboard
2831+ 4. Access browser and type:
2832+ .
2833+ https://localhost:4201
2834+ .
2835+ 5. Paste clipboard token into Snapweb Access Token textbox
2836+_verification:
2837+ Verify that access is allowed and installed apps list is shown
2838+
2839+id: snapweb/snaps/installed-snaps
2840+category_id: snapweb
2841+_description: Verify installed snaps list
2842+plugin: manual
2843+depends: snapweb/setup/ensure-token-access
2844+_steps:
2845+ 1. Access browser and type:
2846+ .
2847+ https://localhost:4201
2848+ .
2849+ 2. In a device terminal type:
2850+ .
2851+ $ snap list
2852+ .
2853+_verification:
2854+ Verify that the list of 'Apps installed' in browser is the same
2855+ as the list shown in terminal, except snapweb itself that should
2856+ be only shown in terminal list
2857+
2858+id: snapweb/snaps/installable-snaps
2859+category_id: snapweb
2860+_description: Verify that snaps can be installed and filtered
2861+plugin: manual
2862+depends: snapweb/setup/ensure-token-access
2863+_steps:
2864+ 1. Access browser and type:
2865+ .
2866+ https://localhost:4201
2867+ .
2868+ 2. Click on last entry on Apps installed section named 'Get more apps'
2869+ or click on 'Store' upper tab
2870+ 3. Click on the links over snaps to filter them
2871+ 4. Search for certain snap name in upper search box
2872+_verification:
2873+ Verify that at the beginning there is a list of snaps that can be installed,
2874+ everyone with its icon, version, author and a button with label 'Install'.
2875+ Verify that the list can be filtered by pressing links over
2876+ Verify you get results when searching for a snap that it's in the list of
2877+ installables
2878+
2879+id: snapweb/snaps/install-snap
2880+category_id: snapweb
2881+_description: Ensure that a snap can be installed using web ui
2882+plugin: manual
2883+depends: snapweb/setup/ensure-token-access
2884+_steps:
2885+ 1. Access browser and type:
2886+ .
2887+ https://localhost:4201
2888+ .
2889+ 2. Click on 'Install' button of any available snap
2890+ 3. Wait for snap to be installed and open a terminal
2891+ 4. Type in terminal:
2892+ .
2893+ $ snap list
2894+ .
2895+_verification:
2896+ Verify that the snap requested to be installed is there in the terminal resultant list
2897+ Verify that button in step 2 changes its label to 'Installing' while installing
2898+ Verify that button of the instaled snap has now 'Remove' in its label
2899+
2900+id: snapweb/snaps/remove-snap
2901+category_id: snapweb
2902+_description: Ensure that a snap can be removed using web ui
2903+plugin: manual
2904+depends: snapweb/snaps/install-snap
2905+_steps:
2906+ 1. Access browser and type:
2907+ .
2908+ https://localhost:4201
2909+ .
2910+ 2. Click on 'Remove' button of installed snap
2911+ 3. Wait for snap to be removed and open a terminal
2912+ 4. Type in terminal:
2913+ .
2914+ $ snap list
2915+ .
2916+_verification:
2917+ Verify that the snap requested to be removed is not in the terminal resultant list
2918+ Verify that button in step 2 changes its label to 'Removing' while installing
2919+ Verify that button of the removed snap has now 'Install' in its label
2920+
2921diff --git a/com.canonical.se:engineering-tests/units/test-plan.pxu b/com.canonical.se:engineering-tests/units/test-plan.pxu
2922new file mode 100644
2923index 0000000..a7f31d1
2924--- /dev/null
2925+++ b/com.canonical.se:engineering-tests/units/test-plan.pxu
2926@@ -0,0 +1,9 @@
2927+id: engineering-tests
2928+unit: test plan
2929+_name: System Enablement Engineering Tests
2930+_description:
2931+ Set of tests to verify functionality of the snaps produced by the
2932+ System Enablement team at Canonical.
2933+estimated_duration: 2h
2934+include:
2935+ 2017.com.canonical.se::.*
2936diff --git a/com.canonical.se:engineering-tests/units/tpm/tpm.pxu b/com.canonical.se:engineering-tests/units/tpm/tpm.pxu
2937new file mode 100644
2938index 0000000..b00bd89
2939--- /dev/null
2940+++ b/com.canonical.se:engineering-tests/units/tpm/tpm.pxu
2941@@ -0,0 +1,135 @@
2942+# Copyright 2016 Canonical Ltd.
2943+# All rights reserved.
2944+#
2945+# Written by:
2946+# Scott Sweeny <scott.sweeny@canonical.com>
2947+
2948+unit: category
2949+id: tpm1.2
2950+_name: TPM 1.2
2951+
2952+id: tpm1.2/setup/ensure_interface_connection_setup
2953+category_id: tpm1.2
2954+_description: Ensure that the tpm1.2 interfaces are connected
2955+plugin: manual
2956+_steps:
2957+ 1. Connect required tpm1.2 slots/plugs
2958+ .
2959+ $ sudo snap connect tpm:network :network
2960+ $ sudo snap connect tpm:network-bind :network-bind
2961+ $ sudo snap connect tpm:tpm :tpm
2962+ .
2963+_verification:
2964+ Verify that you see the following when running snap interfaces:
2965+ :network tpm
2966+ :network-bind tpm
2967+ :tpm tpm
2968+
2969+id: tpm1.2/setup/get_version
2970+category_id: tpm1.2
2971+plugin: manual
2972+depends: tpm1.2/setup/ensure_interface_connection_setup
2973+_summary: Can get version information from the TPM chip
2974+_purpose:
2975+ Check that basic communication with the TPM chip is working and that version
2976+ information can be retrieved with the expected command.
2977+_steps:
2978+ 1. Execute the following command to show the TPM version:
2979+ .
2980+ $ /snap/bin/tpm.version
2981+_verification:
2982+ Output is similar to below with all fields showing data:
2983+ .
2984+ TPM 1.2 Version Info:
2985+ Chip Version: 1.2.5.81
2986+ Spec Level: 2
2987+ Errata Revision: 3
2988+ TPM Vendor ID: WEC
2989+ Vendor Specific data: 0000
2990+ TPM Version: 01010000
2991+ Manufacturer Info: 57454300
2992+
2993+id: tpm1.2/setup/self_test
2994+category_id: tpm1.2
2995+plugin: manual
2996+depends: tpm1.2/setup/ensure_interface_connection_setup
2997+_summary: TPM self test runs successfully
2998+_purpose:
2999+ Check that the TPM self test runs successfully and returns no errors.
3000+_steps:
3001+ 1. Execute the following command to run the TPM self test:
3002+ .
3003+ $ /snap/bin/tpm.selftest
3004+_verification:
3005+ Output is similar to below (actual values are not important) and no
3006+ error messages are shown:
3007+ .
3008+ TPM Test Results:
3009+ ff010205 51ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
3010+ ffffffff ffffffff ffffffff ffff0000 00000000 00000000 00000000 00000000
3011+ 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000
3012+
3013+
3014+id: tpm1.2/configuration/take_ownership
3015+category_id: tpm1.2
3016+plugin: manual
3017+depends: tpm1.2/setup/ensure_interface_connection_setup
3018+_summary: Taking ownership of the device is possible
3019+_purpose:
3020+ Check that you are able to take ownership of the device using TPM commands.
3021+_steps:
3022+ 1.Execute the following command to take ownership of the TPM chip:
3023+ .
3024+ $ /snap/bin/tpm.takeownership
3025+ .
3026+_verification:
3027+ Verify that you are prompted for both the owner key and the SRK (storage
3028+ root key) and that no errors are returned.
3029+ .
3030+ NOTE: This command will only work if it has not been run before. You can
3031+ reset the TPM with:
3032+ .
3033+ $ /snap/bin/tpm.clear
3034+ .
3035+ Which will invalidate all existing keys and passwords and disable the chip.
3036+ Once this is done you must re-enable the TPM from the device's BIOS before
3037+ it can be used.
3038+
3039+id: tpm1.2/crypto/show_public_key
3040+category_id: tpm1.2
3041+plugin: manual
3042+depends: tpm1.2/setup/ensure_interface_connection_setup
3043+_summary: Showing the public endorsement key succeeds
3044+_purpose:
3045+ Check to make sure that the endorsement key pair exists and the public key
3046+ can be queried.
3047+_steps:
3048+ 1. Execute the following command to see the public key:
3049+ .
3050+ $ /snap/bin/tpm.getpubek
3051+ .
3052+ You may see an error similar to:
3053+ .
3054+ Tspi_TPM_GetPubEndorsementKey failed: 0x00000008 - layer=tpm, code=0008 (8), The TPM target command has been disabled
3055+ .
3056+ This can be safely ignored as long as the public key data is displayed.
3057+_verification:
3058+ Verify that the public key data is shown, for example:
3059+ .
3060+ Public Endorsement Key:
3061+ Version: 01010000
3062+ Usage: 0x0002 (Unknown)
3063+ Flags: 0x00000000 (!VOLATILE, !MIGRATABLE, !REDIRECTION)
3064+ AuthUsage: 0x00 (Never)
3065+ Algorithm: 0x00000020 (Unknown)
3066+ Encryption Scheme: 0x00000012 (Unknown)
3067+ Signature Scheme: 0x00000010 (Unknown)
3068+ Public Key:
3069+ 8b59fad6 83514128 d56e2aa0 5eef7cff ad23c90d 0dd9b1e2 31ef093d 72d947d8
3070+ e02fbe3a 3c235ff0 9c487973 40a28c9b 8b83aaaf dc1254ad 31a95410 811742e5
3071+ 92c16823 6f663413 f7067d3a 9af09ccc 12944a13 51d32980 59a98740 4008ab0c
3072+ 07b7d93b 9393691c 8ae7d84c 5fd4fcef 147934f1 09326225 d5d1b652 ab3e12ee
3073+ fbd1cfba b18abedc de2215cb 97006b92 839fd9a4 3158bc8f 028fe516 550905b3
3074+ e3eef1e1 9f8dd3ab 331cbe62 d32ce937 0c11ad41 1d2e50f3 c69c7cde cd0bf564
3075+ 4b7b16f8 0885dc66 d4411aba a824c1f1 ea8aa743 5c62fad7 e9540b85 5c0dc7af
3076+ 3c1615ae 56af18e4 770aa107 06ef274b 202e2e3e d4c280d8 5ca9e886 9d889e31
3077diff --git a/com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu b/com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu
3078new file mode 100644
3079index 0000000..7667aa5
3080--- /dev/null
3081+++ b/com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu
3082@@ -0,0 +1,319 @@
3083+# Copyright 2017 Canonical Ltd.
3084+# All rights reserved.
3085+#
3086+# Written by:
3087+# Scott Sweeny <scott.sweeny@canonical.com>
3088+
3089+unit: category
3090+id: udisks2
3091+_name: UDisks2
3092+
3093+id: udisks2/setup/ensure_interface_connection_setup
3094+category_id: udisks2
3095+_description: Ensure that the udisks2 interfaces are connected
3096+plugin: manual
3097+_steps:
3098+ 1. Run the following:
3099+ $ sudo snap interfaces udisks2
3100+ .
3101+_verification:
3102+ Verify that you see the following:
3103+ Slot Plug
3104+ :mount-observe udisks2
3105+ :network-bind udisks2
3106+ udisks2:service udisks2:client
3107+ - udisks2:hardware-observe
3108+
3109+id: udisks2/client/can_communicate_with_udisksd
3110+category_id: udisks2
3111+plugin: manual
3112+depends: udisks2/setup/ensure_interface_connection_setup
3113+_summary: udisksctl can communicate with udisksd
3114+_purpose:
3115+ Makes sure udisksctl can communicate with udisksd
3116+_steps:
3117+ 1. Run a simple udisksctl command
3118+ .
3119+ $ sudo udisks2.udisksctl status
3120+ .
3121+_verification:
3122+ Verify that the command returns a list of connected storage devices and no
3123+ errors.
3124+
3125+id: udisks2/service/can_receive_hotplug_events
3126+category_id: udisks2
3127+plugin:manual
3128+depends: udisks2/client/can_communicate_with_udisksd
3129+_summary: udisks can see when a drive is plugged in
3130+_purpose:
3131+ Makes sure that udisks gets the hotplug event when a USB drive is
3132+ plugged in
3133+_steps:
3134+ 1. Start the udisks client and have it watch for new events
3135+ .
3136+ $ sudo udisks2.udisksctl monitor
3137+ .
3138+ 2. Plug in a USB storage device and wait for activity from the client
3139+ .
3140+ 3. Unplug the USB storage device and wait for activity from the client
3141+ .
3142+_verification:
3143+ Verify that udisks shows information about the USB device when it's plugged
3144+ in, and that it recognizes when the device is removed.
3145+ .
3146+ The information shown when the device is plugged in will be everything
3147+ udisks knows about the device and its partitions, expressed as DBus objects.
3148+ You will likely see something like:
3149+ .
3150+ 21:37:20.621: Added /org/freedesktop/UDisks2/drives/Kingston_DataTraveler_2_2e0_0607151625382
3151+ org.freedesktop.UDisks2.Drive:
3152+ CanPowerOff: true
3153+ Configuration: {}
3154+ ConnectionBus: usb
3155+ Ejectable: true
3156+ Id: Kingston-DataTraveler-2.0-0607151625382
3157+ Media: thumb
3158+ MediaAvailable: true
3159+ MediaChangeDetected: true
3160+ .
3161+ and so on for the drive itself, each block device, and each filesystem
3162+
3163+id: udisks2/service/can_mount_unmount
3164+category_id: udisks2
3165+plugin: manual
3166+depends: udisks2/client/can_communicate_with_udisksd
3167+_summary: udisks can mount and unmount a storage device
3168+_purpose:
3169+ Makes sure that udisks can mount and unmount a storage device, and that
3170+ the mount points are visible outside of the snap
3171+_steps:
3172+ 1. Plug in a USB storage device
3173+ 2. Run the following:
3174+ .
3175+ $ sudo udisks2.udisksctl status
3176+ .
3177+ and note the name under the "DEVICE" column for the drive you just
3178+ plugged in. It should be "sdb" or similar
3179+ 3. Mount the filesystem on the device:
3180+ .
3181+ $ sudo udisks2.udisksctl mount -b /dev/<device>1
3182+ .
3183+ Where <device> is the value from the status call above. This should mount
3184+ the first filesystem on the device and return the path
3185+ 4. Examine the mount point:
3186+ .
3187+ $ sudo -s # You must be root to see the mount point
3188+ $ ls /mountpoint/path/returned/above
3189+ .
3190+ Make sure the contents of that directory match what you expect to see on
3191+ the drive.
3192+ .
3193+ Leave the root shell
3194+ $ exit
3195+ 5. Unmount the filesystem:
3196+ .
3197+ $ sudo udisks2.udisksctl unmount -b /dev/<device>1
3198+_verification:
3199+ Verify that mounts and unmounts are performed successfully, and that the
3200+ contents of the drive can be seen from your shell (i.e. outside of the snap's
3201+ own namespace)
3202+
3203+id: udisks2/automount/default_off
3204+category_id: udisks2
3205+plugin: manual
3206+depends: udisks2/setup/ensure_interface_connection_setup
3207+_summary: The automount option defaults to off
3208+_purpose:
3209+ Makes sure that the automount option defaults to disabled
3210+_steps:
3211+ 1. Install the udisks2 snap fresh (i.e. not an upgrade)
3212+ 2. Run the following:
3213+ .
3214+ $ sudo snap get udisks2 automount.enable
3215+_verification:
3216+ Verify that the returned value is "false"
3217+
3218+id: udisks2/automount/disabling_works
3219+category_id: udisks2
3220+plugin: manual
3221+depends: udisks2/automount/default_off
3222+_summary: Disabling automount actually disables automount
3223+_purpose:
3224+ Makes sure that when automount.enabled is set to "false" automounts are
3225+ prevented
3226+_steps:
3227+ 1. Make sure that automount is disabled. Run:
3228+ .
3229+ $ sudo snap set udisks2 automount.enable=false
3230+ 2. Plug in a USB storage device
3231+_verification:
3232+ Verify that no filesystem on the USB device was mounted. /media/root/ should
3233+ be empty
3234+
3235+id: udisks2/automount/automount_works
3236+category_id: udisks2
3237+plugin: manual
3238+depends: udisks2/automount/default_off
3239+_summary: When enabled, automounting works
3240+_purpose:
3241+ Makes sure that automounting a USB drive works when the option is enabled
3242+_steps:
3243+ 1. Make sure that automount is enabled. Run:
3244+ .
3245+ $ sudo snap set udisks2 automount.enable=true
3246+ 2. Plug in a USB storage drive
3247+_verification:
3248+ Verify that the filesystem on the USB device was mounted to
3249+ /media/root/<filesystem label>, for example /media/root/7C69-3855
3250+
3251+id: udisks2/automount/automount_does_not_mount_system_devices
3252+category_id: udisks2
3253+plugin: manual
3254+depends: udisks2/automount/automount_works
3255+_summary: When enabled, automount does not mount system devices
3256+_purpose:
3257+ Makes sure that automount is only restricted to pluggable devices, not system
3258+_steps:
3259+ 1. Make sure that automount is enabled. Run:
3260+ .
3261+ $ sudo snap set udisks2 automount.enable=true
3262+ 3. Reboot the device and wait for it to power on again
3263+ 4. Run the following:
3264+ .
3265+ $ sudo udisks2.udisksctl status
3266+ .
3267+ and check the names under the "DEVICE" column. It should just contain
3268+ thumb drives [if any is plugged-in] and the filesystem. For example,
3269+ in case of RaspberryPi it would contain just: mmcblk0.
3270+ Make sure that system devices, such as an ESP partition, are
3271+ not displayed here.
3272+ 5. Examine the mount point:
3273+ .
3274+ $ sudo -s # You must be root to see the mount point
3275+ $ ls /media/root
3276+ .
3277+ Make sure the contents of that directory match what you expect to see on
3278+ the drive.
3279+ .
3280+ Leave the root shell
3281+ $ exit
3282+_verification:
3283+ Verify that none of the system devices were mounted and their filesystems
3284+ are not available /media/root/<filesystem label>
3285+
3286+id: udisks2/automount/automount_does_mount_usb_devices_plugged_before_boot
3287+category_id: udisks2
3288+plugin: manual
3289+depends: udisks2/automount/automount_works
3290+_summary: When enabled, automount mount USB devices plugged before boot
3291+_purpose:
3292+ Makes sure that system can mount devices plugged in before boot
3293+_steps:
3294+ 1. Make sure that automount is enabled. Run:
3295+ .
3296+ $ sudo snap set udisks2 automount.enable=true
3297+ 2. Switch the device off, insert USB flash drive and boot the device again
3298+ 3. Run the following:
3299+ .
3300+ $ sudo udisks2.udisksctl status
3301+ .
3302+ and check the names under the "DEVICE" column. It should contain the device
3303+ that has been plugged before booting.
3304+ 4. Examine the mount point:
3305+ .
3306+ $ sudo -s # You must be root to see the mount point
3307+ $ ls /media/root
3308+ .
3309+ Make sure the contents of that directory match what you expect to see on
3310+ the drive.
3311+ .
3312+ Leave the root shell
3313+ $ exit
3314+_verification:
3315+ Verify that the cold-plugged device is mounted on boot
3316+
3317+id: udisks2/automount/automount_works_after_manual_unmount
3318+category_id: udisks2
3319+plugin: manual
3320+depends: udisks2/automount/automount_works
3321+_summary: When enabled, automount still works after unmount has been called manually
3322+_purpose:
3323+ Make sure that the system can auto mount devices after the unmount has been called
3324+_steps:
3325+ 1. Make sure that automount is enabled. Run:
3326+ .
3327+ $ sudo snap set udisks2 automount.enable=true
3328+ 2. Insert USB flash drive
3329+ 3. Examine the mount point:
3330+ .
3331+ $ sudo ls /media/root
3332+ .
3333+ Make sure the USB drive that just have been plugged in is listed there.
3334+ 4. Run the following:
3335+ .
3336+ $ sudo udisks2.udisksctl status
3337+ .
3338+ and check the names under the "DEVICE" column. It should contain the device
3339+ that has been plugged before booting.
3340+ 5. Unmount manually:
3341+ .
3342+ $ sudo udisks2.udisksctl unmount -b /dev/<device>1
3343+ 6. Insert another USB flash drive
3344+ 7. Examine the mount point:
3345+ .
3346+ $ sudo ls /media/root
3347+ .
3348+ Make sure the USB drive that just have been plugged in is listed there.
3349+_verification:
3350+ Verify that the USB drive that has been plugged in after the first one has
3351+ been unmounted manually is mounted.
3352+
3353+id: udisks2/debug/default_off
3354+category_id: udisks2
3355+plugin: manual
3356+depends: udisks2/setup/ensure_interface_connection_setup
3357+_summary: The debug option defaults to off
3358+_purpose:
3359+ Makes sure that the debug option defaults to disabled
3360+_steps:
3361+ 1. Install the udisks2 snap fresh (i.e. not an upgrade)
3362+ 2. Run the following:
3363+ .
3364+ $ sudo snap get udisks2 debug.enable
3365+_verification:
3366+ Verify that the returned value is "false"
3367+
3368+id: udisks2/debug/disabling_works
3369+category_id: udisks2
3370+plugin: manual
3371+depends: udisks2/debug/default_off
3372+_summary: Disabling debug actually disables debug logging
3373+_purpose:
3374+ Makes sure that when debug.enabled is set to "false" no loggs are written
3375+_steps:
3376+ 1. Make sure that debug is disabled. Run:
3377+ .
3378+ $ sudo snap set udisks2 debug.enable=false
3379+ 2. Plug in a USB storage device
3380+_verification:
3381+ Verify that no debug information coming from files such as jobs.go,
3382+ dispatcher.go, udisks2.go is written to the journal.
3383+
3384+id: udisks2/automount/debug_works
3385+category_id: udisks2
3386+plugin: manual
3387+depends: udisks2/debug/default_off
3388+_summary: When debug is enabled logs are available
3389+_purpose:
3390+ Makes sure that when debug option is enabled the logs are available
3391+_steps:
3392+ 1. Make sure that debug is enabled. Run:
3393+ .
3394+ $ sudo snap set udisks2 debug.enable=true
3395+ 2. Restart ciborium service for the above change to take effect
3396+ .
3397+ $ sudo systemctl restart snap.udisks2.ciborium.service
3398+ 3. Plug in a USB storage drive
3399+_verification:
3400+ Verify that debug information coming from udisks2 snap (files such as
3401+ jobs.go, dispatcher.go, udisks2.go) is written to the journal.
3402diff --git a/com.canonical.se:engineering-tests/units/upower/00_general.pxu b/com.canonical.se:engineering-tests/units/upower/00_general.pxu
3403new file mode 100644
3404index 0000000..3ab4d2d
3405--- /dev/null
3406+++ b/com.canonical.se:engineering-tests/units/upower/00_general.pxu
3407@@ -0,0 +1,52 @@
3408+# Copyright 2016 Canonical Ltd.
3409+# All rights reserved.
3410+#
3411+# Written by:
3412+# Simon Fels <simon.fels@canonical.com>
3413+
3414+unit: category
3415+id: upower
3416+_name: UPower
3417+
3418+id: upower/general/can_be_installed
3419+category_id: upower
3420+_description: Ensure that the upower snap can be installed
3421+plugin: manual
3422+_steps:
3423+ Install upower snap from the appropiate channel via the following command
3424+ .
3425+ $ snap install --candidate upower
3426+ .
3427+ NOTE: Depending on which channel you want to test you need to select the
3428+ right one. The command above uses the candidate channel as that is the
3429+ most used one.
3430+_verification:
3431+ The installation of the snap should finish with no errors.
3432+
3433+id: upower/general/service_started
3434+category_id: upower
3435+_description: Ensure that the upowerd service is up and running
3436+plugin: manual
3437+_steps:
3438+ Check service status with the following command
3439+ $ systemctl status snap.upower.service.service
3440+_verification:
3441+ Output should look like this:
3442+ snap.upower.upowerd.service - Service for snap application upower.upowerd
3443+ Loaded: loaded (/etc/systemd/system/snap.upower.upowerd.service; enabled; vendor preset: enabled)
3444+ Active: active (running) since Thu 2016-12-15 16:13:37 UTC; 54ms ago
3445+ Main PID: 4265 (upowerd)
3446+ CGroup: /system.slice/snap.upower.upowerd.service
3447+ 4265 /snap/upower/x1/usr/libexec/upowerd
3448+
3449+id: upower/general/client_can_talk_to_service
3450+category_id: upower
3451+_description: Verify that the upower client can talk to the service
3452+plugin: manual
3453+_steps:
3454+ Enumerate available devices available on the system:
3455+ $ upower -e
3456+_verification:
3457+ Output should look like this and at least one device should be present:
3458+ /org/freedesktop/UPower/devices/battery_BAT0
3459+ /org/freedesktop/UPower/devices/DisplayDevice
3460diff --git a/com.canonical.se:engineering-tests/units/upower/10_battery_powered.pxu b/com.canonical.se:engineering-tests/units/upower/10_battery_powered.pxu
3461new file mode 100644
3462index 0000000..d5fe6b1
3463--- /dev/null
3464+++ b/com.canonical.se:engineering-tests/units/upower/10_battery_powered.pxu
3465@@ -0,0 +1,129 @@
3466+# Copyright 2016 Canonical Ltd.
3467+# All rights reserved.
3468+#
3469+# Written by:
3470+# Simon Fels <simon.fels@canonical.com>
3471+
3472+id: upower/battery_powered/battery_detected
3473+category_id: upower
3474+_description: Verify upower is able to detect the battery of the system
3475+plugin: manual
3476+_steps:
3477+ Query upowerd for available power devices on the system
3478+ $ upower -d
3479+_verification:
3480+ The output should be similar to the following and should list the
3481+ battery of your system:
3482+ .
3483+ Device: /org/freedesktop/UPower/devices/line_power_AC
3484+ native-path: AC
3485+ power supply: yes
3486+ updated: Do 15 Dez 2016 15:06:55 CET (7163 seconds ago)
3487+ has history: no
3488+ has statistics: no
3489+ line-power
3490+ warning-level: none
3491+ online: yes
3492+ icon-name: 'ac-adapter-symbolic'
3493+ .
3494+ Device: /org/freedesktop/UPower/devices/battery_BAT0
3495+ native-path: BAT0
3496+ vendor: SANYO
3497+ model: 45N1779
3498+ serial: 115
3499+ power supply: yes
3500+ updated: Do 15 Dez 2016 17:05:18 CET (60 seconds ago)
3501+ has history: yes
3502+ has statistics: yes
3503+ battery
3504+ present: yes
3505+ rechargeable: yes
3506+ state: fully-charged
3507+ warning-level: none
3508+ energy: 97,05 Wh
3509+ energy-empty: 0 Wh
3510+ energy-full: 97,13 Wh
3511+ energy-full-design: 99,47 Wh
3512+ energy-rate: 7,983 W
3513+ voltage: 12,374 V
3514+ percentage: 99%
3515+ capacity: 97,6475%
3516+ technology: lithium-ion
3517+ icon-name: 'battery-full-charged-symbolic'
3518+ .
3519+ Device: /org/freedesktop/UPower/devices/DisplayDevice
3520+ power supply: yes
3521+ updated: Do 15 Dez 2016 16:41:14 CET (1504 seconds ago)
3522+ has history: no
3523+ has statistics: no
3524+ battery
3525+ present: yes
3526+ state: fully-charged
3527+ warning-level: none
3528+ energy: 97,05 Wh
3529+ energy-full: 97,13 Wh
3530+ energy-rate: 7,983 W
3531+ percentage: 99%
3532+ icon-name: 'battery-full-charged-symbolic'
3533+ .
3534+ Daemon:
3535+ daemon-version: 0.99.4
3536+ on-battery: no
3537+ lid-is-closed: no
3538+ lid-is-present: yes
3539+ critical-action: PowerOff
3540+
3541+id: upower/battery_powered/battery_discharging
3542+category_id: upower
3543+_description: Verify upower reports discharging battery
3544+plugin: manual
3545+_steps:
3546+ 1. Unplug the power cable from your battery powered device
3547+ 2. Listen to reported changes from upower
3548+ $ upower -m
3549+_verification:
3550+ Leave the monitor running for some time. It should report the device changes
3551+ for the battery device:
3552+ .
3553+ [17:22:55.277]device changed: /org/freedesktop/UPowerr/devices/battery_BAT0
3554+ [17:22:55.277]device changed: /org/freedesktop/UPower/devices/battery_BAT0
3555+ .
3556+ Verify with the following command that the actual battery capacity is changing
3557+ .
3558+ $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | capacity
3559+ capacity: 97,6475%
3560+ .
3561+ and that the state of the battery device is changed to 'discharging'
3562+ .
3563+ $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state
3564+ state: discharging
3565+
3566+id: upower/battery_powered/low_battery_causes_poweroff
3567+category_id: upower
3568+_description: Verify upower reports discharging battery
3569+plugin: manual
3570+_steps:
3571+ A battery with a low capacity should cause the device to power off. This
3572+ involves as a first step to wait until the battery of the device under test
3573+ is close to being empty. The default trigger of the poweroff action is by
3574+ default at <= 2%
3575+ .
3576+ Depending on how full your device battery is you have to wait some time
3577+ until it is discharged enough.
3578+ .
3579+ Watch the system via
3580+ .
3581+ $ sudo journalctl --no-pager -f
3582+_verification:
3583+ Once the defined threshold of the battery capacity is reached the system
3584+ should power off itself. You can spot this by looking at the output
3585+ of the journalctl command which should print something like:
3586+ .
3587+ Dec 15 16:37:02 localhost.localdomain systemd-logind[1022]: System is powering down
3588+ [...]
3589+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Starting Power-Off...
3590+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Starting Update UTMP about System Runlevel Changes...
3591+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Started Power-Off.
3592+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Started Update UTMP about System Runlevel Changes.
3593+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Reached target Power-Off.
3594+ Dec 15 16:37:02 localhost.localdomain systemd-logind[1022]: Operation 'shutdown' finished.
3595diff --git a/com.canonical.se:engineering-tests/units/upower/20_ac_powered.pxu b/com.canonical.se:engineering-tests/units/upower/20_ac_powered.pxu
3596new file mode 100644
3597index 0000000..169f0e3
3598--- /dev/null
3599+++ b/com.canonical.se:engineering-tests/units/upower/20_ac_powered.pxu
3600@@ -0,0 +1,49 @@
3601+# Copyright 2016 Canonical Ltd.
3602+# All rights reserved.
3603+#
3604+# Written by:
3605+# Simon Fels <simon.fels@canonical.com>
3606+
3607+id: upower/ac_powered/source_detected
3608+category_id: upower
3609+_description: Verify upower is able to detect the AC power source
3610+plugin: manual
3611+_steps:
3612+ Query upowerd for available power devices on the system
3613+ .
3614+ $ upower -e
3615+_verification:
3616+ The AC power source should be listed in the result, e.g.:
3617+ .
3618+ /org/freedesktop/UPower/devices/line_power_AC
3619+
3620+id: upower/ac_powered/status_plugged
3621+category_id: upower
3622+_description: Verify upower report AC source as plugged
3623+plugin: manual
3624+_steps:
3625+ Plug in the AC adapter to your device and query upower with
3626+ .
3627+ $ upower -i /org/freedesktop/UPower/devices/line_power_AC | grep online
3628+ for the online status of the source.
3629+_verification:
3630+ The output should be
3631+ .
3632+ online: yes
3633+ .
3634+ If the source is not plugged upower will report a "no" instead of "yes".
3635+
3636+id: upower/ac_powered/status_unplugged
3637+category_id: upower
3638+_description: Verify upower report AC source as unplugged
3639+plugin: manual
3640+_steps:
3641+ Unplug the AC adapter from your device and query upower with
3642+ $ upower -i /org/freedesktop/UPower/devices/line_power_AC | grep online
3643+ for the online status of the source.
3644+_verification:
3645+ The output should be
3646+ .
3647+ online: no
3648+ .
3649+ If the source is plugged upower will report a "yes" instead of "no".
3650diff --git a/com.canonical.se:engineering-tests/units/wifi-ap/wifi-ap.pxu b/com.canonical.se:engineering-tests/units/wifi-ap/wifi-ap.pxu
3651new file mode 100644
3652index 0000000..2f61369
3653--- /dev/null
3654+++ b/com.canonical.se:engineering-tests/units/wifi-ap/wifi-ap.pxu
3655@@ -0,0 +1,213 @@
3656+# Copyright 2016 Canonical Ltd.
3657+# All rights reserved.
3658+#
3659+# Written by:
3660+# Jim Hodapp <jim.hodapp@canonical.com>
3661+# Simon Fels <simon.fels@canonical.com>
3662+# Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
3663+
3664+unit: category
3665+id: wifi_ap
3666+_name: WiFi Access Point
3667+
3668+id: wifi_ap/setup/ensure_interface_connection_setup
3669+category_id: wifi_ap
3670+_description: Ensure that the wifi_ap interfaces are connected
3671+plugin: manual
3672+_steps:
3673+ 0. If the wifi-ap snap is already installed remove it via
3674+ .
3675+ $ snap remove wifi-ap
3676+ .
3677+ 1. Network Manager setup
3678+ .
3679+ For snaps on Classic:
3680+ NetworkManager is part of the base Ubuntu Desktop system
3681+ and does not need to be installed again.
3682+ .
3683+ For an Ubuntu Core system you have to install
3684+ the NetworkManager snap from the Ubuntu store.
3685+ $ snap install network-manager
3686+ .
3687+ 2. Install now the wifi-ap snap via
3688+ .
3689+ $ snap install wifi-ap
3690+ .
3691+_verification:
3692+ Verify that you see the following when running snap interfaces:
3693+ :firewall-control wifi-ap
3694+ :network-control wifi-ap
3695+ :network wifi-ap
3696+ :network-bind wifi-ap
3697+ .
3698+ For snaps on Classic:
3699+ :network-manager wifi-ap
3700+ .
3701+ For full-snap based system:
3702+ network-manager:service wifi-ap:network-manager
3703+
3704+id: wifi_ap/configuration/get_all
3705+category_id: wifi_ap
3706+plugin: manual
3707+depends: wifi_ap/setup/ensure_interface_connection_setup
3708+_summary: All WiFi AP configuration items are listed
3709+_purpose:
3710+ Check if the configuration of the WiFi AP can be listed
3711+ with the expected command.
3712+_steps:
3713+ 1. Execute the following command to retrieve all configuration items:
3714+ .
3715+ $ /snap/bin/wifi-ap.config get
3716+_verification:
3717+ All available configuration items are listed as output.
3718+
3719+id: wifi_ap/configuration/set_any
3720+category_id: wifi_ap
3721+plugin: manual
3722+depends: wifi_ap/setup/ensure_interface_connection_setup
3723+_summary: Setting any configuration key is possible
3724+_purpose:
3725+ Check if any configuration key can be set via the
3726+ configuration system of the snap.
3727+_steps:
3728+ 1. Retrieve the current value of a specific configuration item
3729+ e.g. 'wifi.interface'.
3730+ .
3731+ $ /snap/bin/wifi-ap.config get wifi.interface
3732+ .
3733+ 2. Set a new value for the same configuration item
3734+ .
3735+ $ sudo /snap/bin/wifi-ap.config set wifi.interface=wlan1
3736+ .
3737+ 3. Retrieve the current value of the same configuration item
3738+ for comparison.
3739+ .
3740+ $ /snap/bin/wifi-ap.config get wifi.interface
3741+_verification:
3742+ Verify that the new value for the configuration is not the same
3743+ as before the 'set' operation and is now the the value specified
3744+ in step 2.
3745+
3746+id: wifi_ap/connect/enable_ap
3747+category_id: wifi_ap
3748+plugin: manual
3749+depends: wifi_ap/setup/ensure_interface_connection_setup
3750+_summary: Enabling the AP succeeds
3751+_purpose:
3752+ Check to make sure the AP can be enabled.
3753+_steps:
3754+ 0. If the AP is already enabled as on some devices where the
3755+ automated wizard was able to find a good configuration
3756+ automatically you can skip the following steps. You can
3757+ verify if the AP is active by calling
3758+ .
3759+ $ /snap/bin/wifi-ap.status
3760+ ap.active: true
3761+ .
3762+ 1. Look up and set the wifi interface to the proper name
3763+ e.g. from default wlan0 to enp0s3
3764+ .
3765+ $ ifconfig
3766+ $ /snap/bin/wifi-ap.config set wifi.interface=<interface_name>
3767+ .
3768+ 2. Enable the AP with the default configuration for other key values
3769+ .
3770+ $ sudo /snap/bin/wifi-ap.config set disabled=false
3771+ .
3772+ 3. Verify that the AP is enabled by looking at the key/value pair
3773+ .
3774+ $ /snap/bin/wifi-ap.config get disabled
3775+_verification:
3776+ Verify that the new value for the disabled is set to false. Also verify that a
3777+ different machine such as a phone or a laptop can connect to the AP using
3778+ SSID of "Ubuntu" and no security type.
3779+
3780+id: wifi_ap/configuration/control_socket
3781+category_id: wifi_ap
3782+plugin: manual
3783+depends: wifi_ap/setup/ensure_interface_connection_setup
3784+_summary: Check content interface
3785+_purpose:
3786+ Check if the content interface is accessible and
3787+ it exports a socket for a consumer snap.
3788+_steps:
3789+ 1. Install the wifiap-consumer snap
3790+ .
3791+ $ sudo snap install wifiap-consumer
3792+ .
3793+ 2. Connect the wifi-ap and wifiap-consumer content interface
3794+ .
3795+ $ sudo snap connect wifiap-consumer:control wifi-ap:control
3796+ .
3797+ 3. Get the configuration with the unix HTTP client
3798+ .
3799+ $ sudo wifiap-consumer.unixhttpc /v1/configuration
3800+ .
3801+_verification:
3802+ Verify that the configuration is a valid JSON with reasonable data, like:
3803+ {
3804+ "result": {
3805+ "debug": false,
3806+ "disabled": false,
3807+ "wifi.interface": "wlan0",
3808+ "wifi.security": "open",
3809+ "wifi.ssid": "Ubuntu"
3810+ },
3811+ "status": "OK",
3812+ "status-code": 200,
3813+ "type": "sync"
3814+ }
3815+
3816+id: wifi_ap/configuration/default_ssid
3817+category_id: wifi_ap
3818+plugin: manual
3819+_summary: WiFi AP default SSID is set from gadget snap
3820+_purpose:
3821+ Check if the configuration of the WiFi AP SSID is set to the value
3822+ coming from the gadget snap, when present.
3823+_steps:
3824+ 1. Install a gadget snap which contains in gadget.yaml:
3825+ .
3826+ defaults:
3827+ # Below snap ID matches the one assigned for wifi-ap in the Ubuntu Store
3828+ 2rGgvyaY0CCzlWuKAPwFtCWrgwkM8lqS:
3829+ default.wifi.ssid: GadgetSnap
3830+ .
3831+ 2. Reboot
3832+ 3. Remove wifi-ap if present:
3833+ .
3834+ $ snap remove wifi-ap
3835+ .
3836+ 4. Install wifi-ap (this must be done from the store, otherwise the gadget
3837+ will not set the defaults for the snap). Assuming we are testing candidate:
3838+ .
3839+ $ snap install --candidate wifi-ap
3840+ .
3841+ 5. Get the SSID value:
3842+ .
3843+ $ /snap/bin/wifi-ap.config get wifi.ssid
3844+ .
3845+_verification:
3846+ Check that wifi.ssid=GadgetSnap
3847+
3848+id: wifi_ap/configuration/country_code
3849+category_id: wifi_ap
3850+plugin: manual
3851+depends: wifi_ap/connect/enable_ap
3852+_summary: WiFi AP sends the country code IE in beacon frames
3853+_purpose:
3854+ Check if the WiFi AP sends the configured country code in beacon frames
3855+_steps:
3856+ 1. Set the ISO/IEC 3166-1 code of the country you are in at the moment,
3857+ for instance
3858+ .
3859+ $ sudo wifi-ap.config set wifi.country-code=ES
3860+ .
3861+ 2. Use a device with wifi to capture the beacon frames. You have to
3862+ turn on monitor mode for the wifi card to achieve this. See, for
3863+ instance https://sandilands.info/sgordon/capturing-wifi-in-monitor-mode-with-iw.
3864+ 3. Capture the packets with tcpdump or wireshark
3865+ 4. Check that the beacon frames from the SSID from the device where
3866+ you are testing wifi-ap contain the country code information element.
3867+_verification:
3868+ Check that IE contains the configure country code.
3869diff --git a/com.canonical.se:engineering-tests/units/wifi-connect/wifi.connect.pxu b/com.canonical.se:engineering-tests/units/wifi-connect/wifi.connect.pxu
3870new file mode 100644
3871index 0000000..78fce85
3872--- /dev/null
3873+++ b/com.canonical.se:engineering-tests/units/wifi-connect/wifi.connect.pxu
3874@@ -0,0 +1,202 @@
3875+# Copyright 2017 Canonical Ltd.
3876+# All rights reserved.
3877+#
3878+# Written by:
3879+# Roberto Mier Escandon <roberto.escandon@canonical.com>
3880+
3881+unit: category
3882+id: wifi-connect
3883+_name: WiFi Connect
3884+
3885+id: wifi-connect/setup/ensure_interface_connection_setup
3886+category_id: wifi-connect
3887+_description: Ensure that the wifi-connect interfaces are connected
3888+plugin: manual
3889+_steps:
3890+ 0. If the wifi-connect snap is already installed remove it via
3891+ .
3892+ $ snap remove wifi-connect
3893+ .
3894+ 1. Network Manager setup
3895+ .
3896+ For snaps on Classic:
3897+ NetworkManager is part of the base Ubuntu Desktop system
3898+ and does not need to be installed again.
3899+ .
3900+ For an Ubuntu Core system you have to install
3901+ the NetworkManager snap from the Ubuntu store.
3902+ $ snap install network-manager
3903+ .
3904+ 2. Wifi AP setup
3905+ .
3906+ You have to install Wifi AP snap.
3907+ $ snap install wifi-ap
3908+ .
3909+ 3. Install now the wifi-connect snap via
3910+ .
3911+ $ snap install wifi-connect
3912+ .
3913+ 4. Connect wifi-connect interfaces
3914+ .
3915+ $ snap connect wifi-connect:control wifi-ap:control
3916+ $ snap connect wifi-connect:network core:network
3917+ $ snap connect wifi-connect:network-bind core:network-bind
3918+ .
3919+ For snaps on Classic you have to connect:
3920+ $ snap connect wifi-connect:network-manager core:network-manager
3921+ .
3922+ For an Ubuntu Core system you have to connect:
3923+ $ snap connect wifi-connect:network-manager network-manager:service
3924+ .
3925+_verification:
3926+ Verify that you see the following when running snap interfaces:
3927+ :firewall-control wifi-ap
3928+ :network-control wifi-ap
3929+ :network wifi-ap,wifi-connect
3930+ :network-bind wifi-ap,wifi-connect
3931+ wifi-ap:control wifi-connect
3932+ .
3933+ For snaps on Classic:
3934+ :network-manager wifi-ap,wifi-connect
3935+ .
3936+ For full-snap based system:
3937+ network-manager:service wifi-ap:network-manager,wifi-connect:network-manager
3938+
3939+id: wifi-connect/configuration/network_manager_does_not_control_network_before_reboot
3940+category_id: wifi-connect
3941+plugin: manual
3942+depends: wifi-connect/setup/ensure_interface_connection_setup
3943+_summary: NetworkManager does not control all networking before rebooting
3944+_purpose:
3945+ Check if netplan is configured for NetworkManager to control networking
3946+_steps:
3947+ 0. Backup existing /etc/netplan/00-snapd-config.yaml file
3948+ .
3949+ $ mv /etc/netplan/00-snapd-config.yaml ~/
3950+ .
3951+ 1. Create a new netplan config file named /etc/netplan/00-default-nm-renderer.yaml
3952+ .
3953+ $ echo -e "network:\n renderer: NetworkManager" > /etc/netplan/00-default-nm-renderer.yaml
3954+ .
3955+ 2. See current managed devices by NetworkManager:
3956+ .
3957+ $ nmcli d
3958+ .
3959+_verification:
3960+ Verify that wireless device (wlan0 by default) STATE column value does not equals to 'connected' or 'disconnected'
3961+
3962+id: wifi-connect/configuration/network_manager_controls_network_after_reboot
3963+category_id: wifi-connect
3964+plugin: manual
3965+depends: wifi-connect/configuration/network_manager_does_not_control_network_before_reboot
3966+_summary: NetworkManager controls network after configure netplan file and reboot
3967+_steps:
3968+ 0. Reboot the device
3969+ .
3970+ $ sudo reboot
3971+ .
3972+ 1. When the device finished booting, check nm status with the following command:
3973+ .
3974+ $ nmcli d
3975+ .
3976+_verification:
3977+ Verify that wireless device (wlan0 by default) STATE column value does NOT equals to 'unmanaged'.
3978+ If it is connected to external Wi-Fi, it should be displayed in green with 'connected' state, and
3979+ if it is not connected to external Wi-Fi, it should be shown in red iwth 'disconnected' state
3980+
3981+id: wifi-connect/configuration/content_interface_is_plugged_after_reboot
3982+category_id: wifi-connect
3983+plugin: manual
3984+depends: wifi-connect/configuration/network_manager_controls_network_after_reboot
3985+_summary: Check that wifi-ap control interface is connected and working
3986+_steps:
3987+ 0. Enter in snap runtime environment
3988+ .
3989+ $ snap run --shell wifi-connect.wifi-connect
3990+ .
3991+ 1. List $SNAP_COMMON content
3992+ .
3993+ $ ls /var/snap/wifi-connect/common
3994+ .
3995+_verification:
3996+ Check that exists /var/snap/wifi-connect/common/control
3997+
3998+id: wifi-connect/configuration/set_AP_ssid_and_passphrase
3999+category_id: wifi-connect
4000+plugin: manual
4001+depends: wifi-connect/configuration/content_interface_is_plugged_after_reboot
4002+_summary: Verify it is possible changing wifi-ap access point ssid and passphrase params
4003+_steps:
4004+ 0. Set wifi-ap AP ssid
4005+ .
4006+ $ wifi-connect ssid MYSSID
4007+ .
4008+ 1. Set wifi-ap AP passphrase
4009+ .
4010+ $ wifi-connect passphrase MYPASSPHRASE
4011+ .
4012+ 2. Display config
4013+ .
4014+ $ wifi-connect show-ap
4015+ .
4016+_verification:
4017+ Verify into returning values exist:
4018+ wifi.ssid: MYSSID
4019+ wifi.security-passphrase: MYPASSPHRASE
4020+
4021+id: wifi-connect/configuration/set_portal_password
4022+category_id: wifi-connect
4023+plugin: manual
4024+depends: wifi-connect/configuration/content_interface_is_plugged_after_reboot
4025+_summary: Verify portal password change
4026+_steps:
4027+ 0. Set portal password
4028+ .
4029+ $ wifi-connect set-portal-password WHATEVER
4030+ .
4031+_verification:
4032+ Verify result of set-portal-password operation is a hash of 60 chars starting with '$2a$08$' string
4033+
4034+id: wifi-connect/connect/local_AP_is_up
4035+category_id: wifi-connect
4036+plugin: manual
4037+depends: wifi-connect/configuration/network_manager_controls_network_after_reboot
4038+_summary: Verify management portal is up, running and has got some ssids
4039+_steps:
4040+ 0. From another device different from the one where wifi-connect is deployed:
4041+ .
4042+ Search available Wi-Fi access points
4043+ .
4044+_verification:
4045+ Check that an SSID is available named MYSSID (or the one set when configured). Verify you can
4046+ connect to that access point by introducing MYPASSPHRASE password
4047+
4048+id: wifi-connect/connect/can_connect_to_external_wifi
4049+category_id: wifi-connect
4050+plugin: manual
4051+depends: wifi-connect/connect/local_AP_is_up
4052+_summary: Management portal shows available access points and can connect to them
4053+_steps:
4054+ 0. From another device different from the one where wifi-connect is deployed, once connected to local AP
4055+ .
4056+ Open browser and access http://10.0.60.1:8080
4057+ .
4058+_verification:
4059+ Verify a list of available external networks are shown. Verify you can access any of them by setting
4060+ the related passphrase and clicking connect button.
4061+ You should ssh device where wifi-connect is and see if 'nmcli d' command shows device is connected to
4062+ selected external Wi-Fi
4063+
4064+id: wifi-connect/connect/can_get_back_to_management_mode
4065+category_id: wifi-connect
4066+plugin: manual
4067+depends: wifi-connect/connect/can_connect_to_external_wifi
4068+_summary: It is possible to bring back local AP and management portal
4069+_steps:
4070+ 0. From another device different from the one where wifi-connect is deployed, once connected to external Wi-Fi
4071+ .
4072+ Open browser and access http://<device_ip>:8080 (or http://<device_hostname>.local:8080 in case browser device supports avahi)
4073+ .
4074+_verification:
4075+ Check that a web is shown with a button to return back to management mode. Press button and after passed around a minute
4076+ verify same steps as the ones in id=wifi-connect/connect/can_connect_to_external_wifi
4077diff --git a/com.canonical.se:engineering-tests/units/wireless-tools/wireless-tools.pxu b/com.canonical.se:engineering-tests/units/wireless-tools/wireless-tools.pxu
4078new file mode 100644
4079index 0000000..39c070e
4080--- /dev/null
4081+++ b/com.canonical.se:engineering-tests/units/wireless-tools/wireless-tools.pxu
4082@@ -0,0 +1,100 @@
4083+# Copyright 2016 Canonical Ltd.
4084+# All rights reserved.
4085+#
4086+# Written by:
4087+# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
4088+
4089+unit: category
4090+id:wireless-tools
4091+_name: Wireless Tools
4092+
4093+id: wireless-tools/setup/ensure_interface_connection_setup
4094+category_id: wireless-tools
4095+_description: Ensure that wireless_tools interfaces are connected
4096+plugin: manual
4097+_steps:
4098+ 1. Connect required wireless-tools slots/plugs
4099+ .
4100+ $ sudo snap connect wireless-tools:network-control :network-control
4101+ .
4102+_verification:
4103+ Verify that you see the following when running snap interfaces:
4104+ :network wireless-tools
4105+ :network-bind wireless-tools
4106+ :network-control wireless-tools
4107+
4108+id: wireless-tools/rfkill/list
4109+category_id:wireless-tools
4110+plugin: manual
4111+depends: wireless-tools/setup/ensure_interface_connection_setup
4112+_summary: The RF kill switches are listed
4113+_purpose: Check if all RF kill switches that are available on the HW are listed.
4114+_steps:
4115+ 1. Execute the following command to retrieve the list of all RF kill switches:
4116+ .
4117+ $ /snap/bin/wireless-tools.rfkill list
4118+ .
4119+_verification:
4120+ Your expected RF kill switche(s) is/are shown in the output such as:
4121+ <id>: <name>: <description>
4122+ Soft blocked: <yes|no>
4123+ Hard blocked: <yes|no>
4124+ .
4125+ For example:
4126+ 1: phy0: Wireless LAN
4127+ Soft blocked: no
4128+ Hard blocked: no
4129+ 2: hci0: Bluetooth
4130+ Soft blocked: yes
4131+ Hard blocked: no
4132+
4133+id: wireless-tools/rfkill/change_state
4134+category_id:wireless-tools
4135+plugin: manual
4136+depends: wireless-tools/rfkill/list
4137+_summary: It is possible to change the state of RF kill
4138+_purpose: Check if it is possible to change a state of the RF kill switch
4139+_steps:
4140+ 1. Execute the following commands first to list the available RF kill switches
4141+ .
4142+ $ /snap/bin/wireles-tools.rfkill list
4143+ .
4144+ 2. Change the state of the selected RF kill switch using the id obtained in
4145+ the previous step. Note that the action: block or unblock shall be selected
4146+ based on the initial state of the RF kill switch: blocked yes or no.
4147+ .
4148+ $ /snap/bin/wireless-tools.rfkill [un]block <id>
4149+ .
4150+_verification:
4151+ There shall be no output on the standard output however there shall be a
4152+ change of state visible when listing the RF kill switches.
4153+ .
4154+ $ /snap/bin/wireless_tools.rfkill list
4155+ .
4156+
4157+id: wireless_tools/rfkill/capture_event
4158+category_id: wireless-tools
4159+plugin: manual
4160+depends: wireless-tools/rfkill/list
4161+_summary: It is possible to see the events related to RF kill switch(es)
4162+_purpose: Check if it is possible to capture the event notifications
4163+_steps:
4164+ 1. Execute the following command to enter the capture-events mode
4165+ .
4166+ $ /snap/bin/wireless_tools.rfkill event
4167+ .
4168+ 2. Change the state of the RF kill switch using a hardware button if
4169+ available.
4170+_verification:
4171+ The command executed in the step 1 shall block and display the current state
4172+ of the RF kill switches in a following form:
4173+ <timestamp>: idx <id> type <type id> op <op id> soft <0|1> hard <0|1>
4174+ Pressing the hardware RF kill switch should be printed in the following
4175+ form as in the above. For example:
4176+ 1478774281.491635: idx 0 type 2 op 0 soft 0 hard 0
4177+ 1478774281.491762: idx 1 type 1 op 0 soft 0 hard 0
4178+ 1478774281.491776: idx 2 type 2 op 0 soft 1 hard 0
4179+ 1478774301.905695: idx 2 type 2 op 2 soft 0 hard 0
4180+ 1478774307.837112: idx 0 type 2 op 2 soft 1 hard 0
4181+ 1478774310.817935: idx 2 type 2 op 2 soft 1 hard 0
4182+ 1478774310.818989: idx 2 type 2 op 1 soft 1 hard 0
4183diff --git a/com.canonical.se:engineering-tests/units/wpa-supplicant/00_general.pxu b/com.canonical.se:engineering-tests/units/wpa-supplicant/00_general.pxu
4184new file mode 100644
4185index 0000000..11d61b4
4186--- /dev/null
4187+++ b/com.canonical.se:engineering-tests/units/wpa-supplicant/00_general.pxu
4188@@ -0,0 +1,99 @@
4189+# Copyright 2017 Canonical Ltd.
4190+# All rights reserved.
4191+#
4192+# Written by:
4193+# Simon Fels <simon.fels@canonical.com>
4194+
4195+unit: category
4196+id: wpa_supplicant
4197+_name: wpa-supplicant
4198+
4199+id: wpa_supplicant/general/can_be_installed
4200+category_id: wpa_supplicant
4201+_description: Ensure that the wpa-supplicant snap can be installed
4202+plugin: manual
4203+_steps:
4204+ Install wpa-supplicant snap from the appropiate channel via the following command
4205+ .
4206+ $ snap install [--<channel>] wpa-supplicant
4207+ .
4208+ NOTE: Depending on which channel you want to test you need to select the right one.
4209+_verification:
4210+ The installation of the snap should finish with no errors.
4211+
4212+id: wpa_supplicant/general/slots_and_plugs_connected
4213+category_id: wpa_supplicant
4214+depends: wpa_supplicant/general/can_be_installed
4215+plugin: manual
4216+_summary: Verify that all plugs and slots of the snap are connected automatically.
4217+_steps:
4218+ 1. Install the snap from the store:
4219+ .
4220+ $ snap wpa-supplicant
4221+ .
4222+_verification:
4223+ 1. Verify that the 'wpa-supplicant' snap has all required plugs and slots connected
4224+ and you see a similar output like the example below. If any further plugs
4225+ from other snaps are shown for the same slot this can be safely ignored.
4226+ .
4227+ $ snap interfaces wpa-supplicant
4228+ Slot Plug
4229+ :network wpa-supplicant
4230+ :network-control wpa-supplicant
4231+ wpa-supplicant:legacy-service -
4232+ wpa-supplicant:service network-manager:wpa,wpa-supplicant:wpa
4233+
4234+id: wpa_supplicant/general/service_failed_to_start_without_reboot
4235+category_id: wpa_supplicant
4236+depends: wpa_supplicant/general/can_be_installed
4237+_description:
4238+ Verify that the wpa-supplicant can't be started after installation of the snap
4239+ without a system reboot.
4240+plugin: manual
4241+_steps:
4242+ Check service status with the following command
4243+ $ systemctl status snap.wpa-supplicant.wpa.service
4244+_verification:
4245+ Output should look like this:
4246+ .
4247+ * snap.wpa-supplicant.wpa.service - Service for snap application wpa-supplicant.wpa
4248+ Loaded: loaded (/etc/systemd/system/snap.wpa-supplicant.wpa.service; enabled; vendor preset: enabled)
4249+ Active: inactive (dead) (Result: exit-code) since Mon 2017-03-20 10:45:00 UTC; 5s ago
4250+ Process: 2645 ExecStart=/usr/bin/snap run wpa-supplicant.wpa (code=exited, status=255)
4251+ Main PID: 2645 (code=exited, status=255)
4252+
4253+id: wpa_supplicant/general/service_starts_after_reboot
4254+category_id: wpa_supplicant
4255+depends: wpa_supplicant/general/service_failed_to_start_without_reboot
4256+_description: Ensure that the wpa-supplicant service is up and running
4257+plugin: manual
4258+_steps:
4259+ 1. Reboot the device
4260+ .
4261+ $ sudo reboot
4262+ .
4263+ 2. When the device finished booting, check service status with the following command:
4264+ .
4265+ $ systemctl status snap.wpa-supplicant.wpa.service
4266+_verification:
4267+ Output should look like this:
4268+ .
4269+ * snap.wpa-supplicant.wpa.service - Service for snap application wpa-supplicant.wpa
4270+ Loaded: loaded (/etc/systemd/system/snap.wpa-supplicant.wpa.service; enabled; vendor preset: enabled)
4271+ Active: active (running) since Mon 2017-03-20 08:50:29 UTC; 1h 50min ago
4272+ Main PID: 1587 (wpa_supplicant)
4273+
4274+id: wpa_supplicant/general/system_has_a_single_wpa_running
4275+category_id: wpa_supplicant
4276+depends: wpa_supplicant/general/service_starts_after_reboot
4277+_description: Ensure that only a single wpa-supplicant instance runs on the system.
4278+plugin: manual
4279+_steps:
4280+ Check which wpa-supplicant processes are running via
4281+ .
4282+ $ pgrep wpa_supplicant
4283+_verification:
4284+ The output should list only a single process id, e.g.:
4285+ .
4286+ $ pgrep wpa_supplicant
4287+ 2134
4288diff --git a/com.canonical.se:engineering-tests/units/wpa-supplicant/10_network_manager.pxu b/com.canonical.se:engineering-tests/units/wpa-supplicant/10_network_manager.pxu
4289new file mode 100644
4290index 0000000..3b33e4c
4291--- /dev/null
4292+++ b/com.canonical.se:engineering-tests/units/wpa-supplicant/10_network_manager.pxu
4293@@ -0,0 +1,74 @@
4294+# Copyright 2017 Canonical Ltd.
4295+# All rights reserved.
4296+#
4297+# Written by:
4298+# Simon Fels <simon.fels@canonical.com>
4299+
4300+id: wpa_supplicant/network_manager/wpa_plug_connected
4301+category_id: wpa_supplicant
4302+depends: wpa_supplicant/general/system_has_a_single_wpa_running
4303+_description:
4304+ Ensure that the necessary wpa plug of the network-manager snap is connected.
4305+plugin: manual
4306+_steps:
4307+ 1. Install the NetworkManager snap from the store
4308+ .
4309+ $ snap install network-manager
4310+ .
4311+ 2. List plug/slot connections for the wpa-supplicant snap
4312+ .
4313+ $ snap interfaces wpa-supplicant
4314+_verification:
4315+ Output should look like:
4316+ .
4317+ Slot Plug
4318+ [...]
4319+ wpa-supplicant:service network-manager:wpa
4320+
4321+id: wpa_supplicant/network_manager/finds_wifi_networks
4322+category_id: wpa_supplicant
4323+depends: wpa_supplicant/network_manager/wpa_plug_connected
4324+_description:
4325+ Verify WiFi networks can be found by using the wpa-supplicant and
4326+ network-manager snaps.
4327+plugin: manual
4328+_steps:
4329+ 1. Trigger a scan for WiFi networks
4330+ .
4331+ $ nmcli d wifi rescan
4332+ .
4333+ 2. List found WiFi networks
4334+ .
4335+ $ nmcli d wifi
4336+_verification:
4337+ The output should look similar to the following and should list available
4338+ WiFi networks in your environment:
4339+ .
4340+ * SSID MODE CHAN RATE SIGNAL BARS SECURITY
4341+ * test1 Infra 6 54 Mbit/s 85 **** WPA1 WPA2
4342+ test2 Infra 6 54 Mbit/s 45 ** WPA1 WPA2
4343+
4344+id: wpa_supplicant/network_manager/connect_secure_wifi_network
4345+category_id: wpa_supplicant
4346+depends: wpa_supplicant/network_manager/finds_wifi_networks
4347+_description:
4348+ Verify connecting one of the previously found WiFi networks is possible.
4349+ network-manager snaps.
4350+plugin: manual
4351+_steps:
4352+ Connect one of the previously found WiFi networks via:
4353+ .
4354+ $ nmcli d wifi connect <SSID> password <password>
4355+ .
4356+ Replace <SSID> and <password> with the right values for your selected WiFi
4357+ network.
4358+_verification:
4359+ The nmcli command call should return with no error. Verify why running
4360+ .
4361+ $ echo $?
4362+ 0
4363+ .
4364+ Also verify that the WiFi network is connected:
4365+ .
4366+ $ nmcli d | grep wifi
4367+ wlan0 wifi connected test1
4368diff --git a/media-hub/manage.py b/media-hub/manage.py
4369deleted file mode 100755
4370index 81b22c3..0000000
4371--- a/media-hub/manage.py
4372+++ /dev/null
4373@@ -1,10 +0,0 @@
4374-#!/usr/bin/env python3
4375-from plainbox.provider_manager import setup, N_
4376-
4377-setup(
4378- name='plainbox-provider-media-hub',
4379- namespace='2017.com.canonical.media-hub',
4380- version="1.0",
4381- description=N_("Plainbox provider for the media-hub snap"),
4382- gettext_domain="2017_com_canonical_media_hub",
4383-)
4384diff --git a/media-hub/units/media-hub-snap.pxu b/media-hub/units/media-hub-snap.pxu
4385deleted file mode 100644
4386index 24ad2bc..0000000
4387--- a/media-hub/units/media-hub-snap.pxu
4388+++ /dev/null
4389@@ -1,73 +0,0 @@
4390-# Copyright (C) 2017 Canonical Ltd.
4391-# All rights reserved.
4392-#
4393-# Written by:
4394-# Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
4395-
4396-id: media_hub/snap_classic/play_wav
4397-category_id: media_hub
4398-plugin: manual
4399-_summary: Confined media-hub can play wav files
4400-_purpose:
4401- Check if media-hub properly plays wav files when confined. The scenario is
4402- Unity8 on Classic.
4403-_steps:
4404- 1. Install snaps and perform needed interface connections
4405- .
4406- $ snap install media-hub
4407- $ snap install --devmode mediaplayer-app
4408- $ sudo snap connect mediaplayer-app:mpris media-hub:mpris
4409- .
4410- 2. Start media-hub-server (needed until LP #1613420 is solved)
4411- .
4412- $ media-hub.media-hub-service
4413- .
4414- 3. Download sample file
4415- .
4416- $ wget -P ~/Music/ http://freewavesamples.com/files/Kawai-K5000W-Buchla-C1.wav
4417- .
4418- 4. Launch mediaplayer-app
4419- .
4420- $ /snap/bin/mediaplayer-app ~/Music/Kawai-K5000W-Buchla-C1.wav
4421- .
4422- 5. Let the song play until the end
4423- 6. Restart playback after the song finishes
4424- 7. Pause, then press play again a few times
4425- 8. While the song is playing, move the slider back and forth in time
4426- 9. Pause the song, then move the slider again
4427-_verification:
4428- Verify that in all cases the audio is played as expected.
4429-
4430-id: media_hub/snap_classic/play_mp3
4431-category_id: media_hub
4432-plugin: manual
4433-_summary: Confined media-hub can play an mp3
4434-_purpose:
4435- Check if media-hub properly plays an mp3 when confined. The scenario is Unity8
4436- on Classic.
4437-_steps:
4438- 1. Install snaps and perform needed interface connections
4439- .
4440- $ snap install media-hub
4441- $ snap install --devmode mediaplayer-app
4442- $ sudo snap connect mediaplayer-app:mpris media-hub:mpris
4443- .
4444- 2. Start media-hub-server (needed until LP #1613420 is solved)
4445- .
4446- $ media-hub.media-hub-service
4447- .
4448- 3. Download sample file
4449- .
4450- $ wget -P ~/Music/ http://www.stephaniequinn.com/Music/Canon.mp3
4451- .
4452- 4. Launch mediaplayer-app
4453- .
4454- $ /snap/bin/mediaplayer-app ~/Music/Canon.mp3
4455- .
4456- 5. Let the song play until the end
4457- 6. Restart playback after the song finishes
4458- 7. Pause, then press play again a few times
4459- 8. While the song is playing, move the slider back and forth in time
4460- 9. Pause the song, then move the slider again
4461-_verification:
4462- Verify that in all cases the audio is played as expected.
4463diff --git a/media-hub/units/media-hub.pxu b/media-hub/units/media-hub.pxu
4464deleted file mode 100644
4465index bdeec69..0000000
4466--- a/media-hub/units/media-hub.pxu
4467+++ /dev/null
4468@@ -1,65 +0,0 @@
4469-# Copyright 2017 Canonical Ltd.
4470-# All rights reserved.
4471-#
4472-# Written by:
4473-# Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
4474-
4475-unit: category
4476-id: media_hub
4477-_name: media-hub
4478-
4479-id: media_hub/video/play_h264
4480-category_id: media_hub
4481-plugin: manual
4482-_summary: H.264 videos play as expected
4483-_purpose:
4484- Check if media-hub plays properly H.264 videos
4485-_steps:
4486- 1. Download H.264 video
4487- .
4488- $ wget https://download.blender.org/durian/trailer/sintel_trailer-720p.mp4
4489- .
4490- 2. Start media-hub-server
4491- .
4492- $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
4493- .
4494- 3. Start to play the video
4495- .
4496- $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 sintel_trailer-720p.mp4
4497- .
4498- 4. Let the video play until the end
4499- 5. Re-start after the video finishes
4500- 6. Pause, then press play again a few times
4501- 7. While the video is playing, move the slider back and forth in time
4502- 8. Pause the video, then move the slider again
4503- 9. Re-size, maximize, then minimize the window several times
4504-_verification:
4505- Verify that in all cases the video is played as expected.
4506-
4507-id: media_hub/video/play_mpeg4
4508-category_id: media_hub
4509-plugin: manual
4510-_summary: MPEG4 videos play as expected
4511-_purpose:
4512- Check if media-hub plays properly MPEG4 videos
4513-_steps:
4514- 1. Download H.264 video
4515- .
4516- $ wget https://download.blender.org/durian/trailer/Sintel_Trailer.480p.DivX_Home_Theater.divx
4517- .
4518- 2. Start media-hub-server
4519- .
4520- $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
4521- .
4522- 3. Start to play the video
4523- .
4524- $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 Sintel_Trailer.480p.DivX_Home_Theater.divx
4525- .
4526- 4. Let the video play until the end
4527- 5. Re-start after the video finishes
4528- 6. Pause, then press play again a few times
4529- 7. While the video is playing, move the slider back and forth in time
4530- 8. Pause the video, then move the slider again
4531- 9. Re-size, maximize, then minimize the window several times
4532-_verification:
4533- Verify that in all cases the video is played as expected.
4534diff --git a/modem-manager/manage.py b/modem-manager/manage.py
4535deleted file mode 100755
4536index 8570bb9..0000000
4537--- a/modem-manager/manage.py
4538+++ /dev/null
4539@@ -1,10 +0,0 @@
4540-#!/usr/bin/env python3
4541-from plainbox.provider_manager import setup, N_
4542-
4543-setup(
4544- name='plainbox-provider-modem-manager',
4545- namespace='2016.com.canonical.modem-manager',
4546- version="1.0",
4547- description=N_("Plainbox provider for the ModemManager snap"),
4548- gettext_domain="2016_com_canonical_modem_manager",
4549-)
4550diff --git a/modem-manager/units/modem-manager.pxu b/modem-manager/units/modem-manager.pxu
4551deleted file mode 100644
4552index 3912ac2..0000000
4553--- a/modem-manager/units/modem-manager.pxu
4554+++ /dev/null
4555@@ -1,103 +0,0 @@
4556-# Copyright 2016 Canonical Ltd.
4557-# All rights reserved.
4558-#
4559-# Written by:
4560-# Jim Hodapp <jim.hodapp@canonical.com>
4561-# Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
4562-
4563-unit: category
4564-id: modem_manager
4565-_name: Modem Manager
4566-
4567-id: modem_manager/setup/ensure_interface_connection_setup
4568-category_id: modem_manager
4569-_description: Ensure that the modem-manager interface is connected
4570-plugin: manual
4571-_steps:
4572- 1. Install network-manager if not already installed
4573- .
4574- $ sudo snap install network-manager
4575- .
4576- 2. Connect required modem-manager/network-manager slots/plugs
4577- .
4578- $ sudo snap connect modem-manager:mmcli modem-manager:service
4579- $ sudo snap connect network-manager:nmcli network-manager:service
4580- $ sudo snap connect network-manager:modem-manager modem-manager:service
4581- $ sudo snap connect network-manager:ppp ubuntu-core:ppp
4582- .
4583-_verification:
4584- Verify that you see the following when running snap interfaces:
4585- modem-manager:service modem-manager:mmcli,network-manager:modem-manager
4586- network-manager:service network-manager:nmcli
4587- :ppp network-manager
4588-
4589-id: modem_manager/modems/get_all
4590-category_id: modem_manager
4591-plugin: manual
4592-depends: modem_manager/setup/ensure_interface_connection_setup
4593-_summary: All active modem configuration items are listed
4594-_purpose:
4595- Check if the modem shows up as being recognized by modem-manager.
4596-_steps:
4597- 1. Execute the following command to retrieve the list of all detected modems:
4598- .
4599- $ sudo mmcli -L
4600-_verification:
4601- Your expected modem is shown in the output list.
4602-
4603-id: modem_manager/modems/get_info
4604-category_id: modem_manager
4605-plugin: manual
4606-depends: modem_manager/setup/ensure_interface_connection_setup
4607-_summary: All modem information listed
4608-_purpose:
4609- Check if the modem details can be listed.
4610-_steps:
4611- 1. Execute the following command to retrieve the list of all detected modems.
4612- Note, the modem number is listed from the previous test:
4613- .
4614- $ sudo mmcli -m <modem_number>
4615-_verification:
4616- Your desired modem detail is listed.
4617-
4618-id: modem_manager/modems/connect
4619-category_id: modem_manager
4620-plugin: manual
4621-depends: modem_manager/setup/ensure_interface_connection_setup
4622-_summary: Connect to a listed modem
4623-_purpose:
4624- Connect to a listed modem and verify connection status
4625-_steps:
4626- 1. Execute the following commands to connect to a particular modem. First run
4627- "sudo nmcli d" to find out what you need to put in <interface> (look for
4628- TYPE=gsm, the interface will be the name in the DEVICE column). It will
4629- probably be something that starts with "tty" or "cdc". Also, replace
4630- <op_apn> by looking up the APN string for your cell provider at
4631- http://www.apn-settings.com (e.g. "fast.t-mobile.com" for T-Mobile 4G).
4632- Finally, "gsmconn" is an arbitrary connection name and can be set to
4633- anything that makes sense for the connection type.
4634- .
4635- $ sudo nmcli c add type gsm ifname <interface> con-name gsmconn apn <op_apn>
4636- $ sudo nmcli r wwan on
4637- .
4638- 2. Check that the connection is up with "sudo nmcli d". It should show that
4639- state is "connected". This can take some time depending on network
4640- conditions and on the modem type.
4641- .
4642- 3. Check which is the network interface for the cellular connection. For this,
4643- fist run
4644- .
4645- $ sudo nmcli d show <interface>
4646- .
4647- (here <interface> is the one from point 1), check the IP4.ADDRESS field,
4648- then run
4649- .
4650- $ ip address
4651- .
4652- and there you can find the network interface that owns that address.
4653- .
4654- 4. Add a route to 8.8.8.8 with
4655- .
4656- $ sudo ip route add 8.8.8.8 dev <network-interface>
4657-_verification:
4658- Verify that you have a modem connection by pinging 8.8.8.8.
4659diff --git a/network-manager/manage.py b/network-manager/manage.py
4660deleted file mode 100755
4661index 86969f2..0000000
4662--- a/network-manager/manage.py
4663+++ /dev/null
4664@@ -1,10 +0,0 @@
4665-#!/usr/bin/env python3
4666-from plainbox.provider_manager import setup, N_
4667-
4668-setup(
4669- name='plainbox-provider-network-manager',
4670- namespace='2016.com.canonical.network-manager',
4671- version="1.0",
4672- description=N_("Plainbox provider for the NetworkManager snap"),
4673- gettext_domain="2016_com_canonical_network_manager",
4674-)
4675diff --git a/network-manager/units/network-manager.pxu b/network-manager/units/network-manager.pxu
4676deleted file mode 100644
4677index 27d9b8b..0000000
4678--- a/network-manager/units/network-manager.pxu
4679+++ /dev/null
4680@@ -1,325 +0,0 @@
4681-# Copyright 2016 Canonical Ltd.
4682-# All rights reserved.
4683-#
4684-# Written by:
4685-# Lorn Potter <lorn.potter@canonical.com>
4686-# Simon Fels <simon.fels@canonical.com>
4687-
4688-unit: category
4689-id: network_manager
4690-_name: Network Manager
4691-
4692-id: network_manager/misc/check_for_crashes
4693-category_id: network_manager
4694-plugin: manual
4695-_summary: Verify that NetworkManager hasn't crashed in previous runs.
4696-_steps:
4697- 1. Power on a Desktop system, this tests does not apply elsewhere.
4698- 2. List content of /var/crash for crash dumps:
4699- .
4700- ls -l /var/crash
4701- .
4702-_verification:
4703- 1. Check that /var/crash is empty.
4704-
4705-id: network_manager/ethernet/enable_support
4706-category_id: network_manager
4707-plugin: manual
4708-_summary: Ethernet support for NetworkManager needs to be manually enabled
4709-_purpose:
4710- By default ethernet support is disabled in the network-manager snap. In order
4711- to be able to get it managed through NetworkManager a few manual steps need to
4712- be performed.
4713-_steps:
4714- 1. Create /etc/netplan/00-default-nm-renderer.yaml with the following content:
4715- .
4716- network:
4717- renderer: NetworkManager
4718- .
4719- 2. Drop any other files from /etc/netplan and reboot the device.
4720-_verification:
4721- NOTE: The device may get another IP address assigned as before. Use a network
4722- scanner or a monitor+keyboard to check which IP address it got assigned.
4723- .
4724- Once the device is rebooted you should be able to connect to it by using the
4725- network connection offered on the ethernet port. When logged into the device
4726- verify NetworkManager automatically connected the ethernet port:
4727- .
4728- $ network-manager.nmcli d
4729- DEVICE TYPE STATE CONNECTION
4730- eth0 ethernet connected eth0
4731- [...]
4732- .
4733- The state of all ethernet devices with a plugged cable and a working network
4734- behind should be 'connected'.
4735-
4736-id: network_manager/ethernet/all_ports_detected
4737-depends: network_manager/ethernet/enable_support
4738-category_id: network_manager
4739-plugin: manual
4740-_summary: NetworkManager should detect all available ethernet ports
4741-_purpose:
4742- NetworkManager should detect all available ethernet ports by default
4743- on a system and list them as usable devices.
4744-_steps:
4745- 1. List all available ethernet ports
4746- $ ifconfig -a | grep -E '$eth'
4747- $ ifconfig -a | grep -E '$en'
4748- 2. List all ethernet ports NetworkManager knows about
4749- $ network-manager.nmcli d
4750-_verification:
4751- Both steps should show the same list of ethernet network interfaces.
4752-
4753-id: network_manager/ethernet/auto_connected
4754-depends: network_manager/ethernet/enable_support
4755-category_id: network_manager
4756-plugin: manual
4757-_summary: NetworkManager should auto-connect any ethernet port with a link
4758-_purpose:
4759- When a cable is plugged into an ethernet port NetworkManager should try
4760- to automatically connect the port.
4761- .
4762- NOTE: This test assumes that the cable you plug into the port is connected
4763- to a network which offers a DHCP server.
4764-_steps:
4765- 1. Ensure that there is no connection for the port you want to use for
4766- testing. Using a serial console to perform this test is recommended.
4767- 2. Drop any existing connections listed by
4768- $ network-manager.nmcli c show
4769- which are meant for the ethernet port of the device with
4770- $ network-manager.nmcli c delete <UUID>
4771- 3. Plug the cable into the ethernet port.
4772-_verification:
4773- The ethernet port should be automatically connected by NetworkManager. This
4774- can be verified with
4775- $ network-manager.nmcli d | grep <ethernet device name>
4776- eth0 ethernet connected <connection name>
4777- Please note that the <connection name> can be different as its
4778- automatically selected by NetworkManager. It can be "Wired Connection 1"
4779- for example.
4780-
4781-id: network_manager/ethernet/auto_connect_existing_connection
4782-depends: network_manager/ethernet/enable_support
4783-category_id: network_manager
4784-plugin: manual
4785-_summary: Cable plug/unplug should give an existing connection
4786-_purpose:
4787- When a cable is unplugged and plugged again the ethernet port should
4788- be automatically reconnected.
4789-_steps:
4790- 1. Check if the ethernet port is currently connected
4791- $ network-manager.nmcli d
4792- 2. Unplug the cable from the ethernet port and check the connection
4793- $ network-manager.nmcli d
4794- 3. Plug the cable again and check the connection status.
4795-_verification:
4796- Before the cable is unplugged the ethernet port should be marked
4797- as connected. Once the cable is removed the connection status
4798- should switch to unconnected. When plugged back in, it should be marked
4799- again as connected.
4800-
4801-id: network_manager/ethernet/unmanaged
4802-category_id: network_manager
4803-plugin: manual
4804-depends: network_manager/ethernet/auto_connected
4805-_summary: Check if ethernet device is unmanaged.
4806-_purpose:
4807- Check if the ethernet device is not managed by Network Manager.
4808- .
4809- NOTE: This only applies to devices where ethernet is not managed by
4810- NetworkManager. Check if /etc/netplan/00-default-nm-renderer.yaml
4811- exists. If it does not, then NetworkManager doesn't touch any
4812- ethernet connection. If it exists, skip this test.
4813-_steps:
4814- 1. Execute the following command to retrieve the list of all detected connections.
4815- Note, the AP number is listed from the previous test:
4816- .
4817- $ /snap/bin/network-manager.nmcli d | grep en
4818-_verification:
4819- The network device is listed as 'unmanaged', as an example:
4820- enxb827ebf6b919 ethernet unmanaged --
4821-
4822-id: network_manager/connections/get_all
4823-category_id: network_manager
4824-plugin: manual
4825-depends: network_manager/ethernet/auto_connected
4826-_summary: All active AP configuration items are listed
4827-_purpose:
4828- Check if the AP shows up as being recognized by Network Manager.
4829-_steps:
4830- 1. Execute the following command to retrieve the list of all detected connections:
4831- .
4832- $ /snap/bin/network-manager.nmcli d wifi list
4833-_verification:
4834- Your expected AP is shown in the output list for example:
4835- pool1 Infra 6 54 Mbit/s 75 *** WPA2
4836-
4837-id: network_manager/connections/agent
4838-category_id: network_manager
4839-plugin: manual
4840-depends: network_manager/ethernet/auto_connected
4841-_summary: Register for secret agent
4842-_purpose:
4843- Register for Network Manager's secret agent and verify status
4844-_steps:
4845- 1. Execute the following command to register secret agent:
4846- .
4847- $ /snap/bin/network-manager.nmcli a
4848-_verification:
4849- Output should be similiar to this:
4850- nmcli successfully registered as a Network Manager's secret agent.
4851- nmcli successfully registered as a polkit agent.
4852-
4853-id: network_manager/connections/connect
4854-category_id: network_manager
4855-plugin: manual
4856-depends: network_manager/ethernet/auto_connected
4857-_summary: Connect to a listed AP
4858-_purpose:
4859- Connect to a listed AP and verify connection status
4860-_steps:
4861- 1. Execute the following commands to connect to a particular AP.
4862- .
4863- $ /snap/bin/network-manager.nmcli dev wifi con "yourssid" password "yourpassword"
4864- Note, replace yourssid with the ssid if the AP you will connect to, and replace yourpassword
4865- with the actual password/passphrase.
4866-_verification:
4867- Verify that you have a AP connection by issuing this command:
4868- $ ifconfig | grep -A 2 wl
4869- .
4870- verifying that the interface has an IP address with output similiar to this:
4871- wlp5s0 Link encap:Ethernet HWaddr 70:77:81:33:92:6b
4872- inet addr:10.0.0.108 Bcast:10.0.0.255 Mask:255.255.255.0
4873- inet6 addr: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64 Scope:Global
4874-
4875-id: network_manager/connections/get_info
4876-category_id: network_manager
4877-plugin: manual
4878-depends: network_manager/ethernet/auto_connected
4879-_summary: All AP information listed
4880-_purpose:
4881- Check if the AP details can be listed.
4882-_steps:
4883- 1. Execute the following command to retrieve the list of all detected connections.
4884- Note, the AP ssid is listed from the previous test:
4885- .
4886- $ /snap/bin/network-manager.nmcli -p -f general,ip4,ip6 c show <AP_SSID>
4887-_verification:
4888- Your desired AP detail is listed and has ip4/ip6 address.
4889- ===============================================================================
4890- Activate connection details (1554e3b2-76e6-4adc-b986-215b7393f8d9)
4891- ===============================================================================
4892- GENERAL.NAME: pool1
4893- GENERAL.UUID: 1554e3b2-76e6-4adc-b986-215b7393f8d9
4894- GENERAL.DEVICES: wlp5s0
4895- GENERAL.STATE: activated
4896- GENERAL.DEFAULT: no
4897- GENERAL.DEFAULT6: no
4898- GENERAL.VPN: no
4899- GENERAL.ZONE: --
4900- GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
4901- GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/3
4902- GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/0
4903- GENERAL.MASTER-PATH: --
4904- -------------------------------------------------------------------------------
4905- IP4.ADDRESS[1]: 10.0.0.108/24
4906- IP4.GATEWAY: 10.0.0.138
4907- IP4.DNS[1]: 10.0.0.138
4908- IP4.DOMAIN[1]: gateway
4909- -------------------------------------------------------------------------------
4910- IP6.ADDRESS[1]: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64
4911- IP6.ADDRESS[2]: 2001:8003:6501:2000:7277:81ff:fe33:926b/64
4912- IP6.ADDRESS[3]: fe80::7277:81ff:fe33:926b/64
4913- IP6.GATEWAY: fe80::e2b9:e5ff:fe5a:91b0
4914- IP6.DNS[1]: 2001:8003:6501:2000::1
4915- IP6.DOMAIN[1]: gateway
4916- -------------------------------------------------------------------------------
4917-
4918-id: network_manager/ethernet/device_supports_wol
4919-depends: network_manager/ethernet/enable_support
4920-category_id: network_manager
4921-plugin: manual
4922-_summary: Verify that the device under test has support for Wake-on-LAN
4923-_purpose:
4924- Verify that the device you're running the tests on supports Wake-on-LAN. For
4925- example, devices like the Raspberry PI (1-3) do not support Wake-on-LAN.
4926-_steps:
4927- Verify that your device supports Wake-on-LAN. You can look into the specs
4928- for your device, ask the vendor or search through the internet.
4929- .
4930- For example the Raspberry PI can't suspend to RAM which is discussed and
4931- outlined in https://github.com/raspberrypi/linux/issues/1281 which also
4932- makes Wake-on-LAN impossible.
4933-_verification:
4934- If device does not support Wake-on-LAN please SKIP this test case and all
4935- depending test cases will be skipped too. If Wake-on-LAN is supported mark
4936- test as PASSED.
4937-
4938-id: network_manager/ethernet/uses_global_wol
4939-depends: network_manager/ethernet/device_supports_wol
4940-category_id: network_manager
4941-plugin: manual
4942-_summary: Ethernet connections are using global wake-on-lan setting
4943-_purpose:
4944- Check if an ethernet connection created by NetworkManager automatically uses the
4945- global default for wake-on-lan.
4946- .
4947- NOTE: This requires a system which is configured to not use netplan to
4948- generate connections for NetworkManager. On such a system an ethernet
4949- connection will always have wake-on-lan disabled as netplan does this
4950- by default if not explicitly stated in the netplan configuration.
4951-_steps:
4952- 1. Find connection UUID for the ethernet port
4953- $ network-manager.nmcli c show | grep eth0
4954- 2. Verify the connection uses the global wake-on-lan setting
4955- $ network-manager.nmcli -m multiline -f 802-3-ethernet.wake-on-lan c show <UUID>
4956-_verification:
4957- The output should look like this:
4958- .
4959- 802-3-ethernet.wake-on-lan: 1 (default)
4960-
4961-id: network_manager/ethernet/has_wol_enabled_by_default
4962-depends: network_manager/ethernet/device_supports_wol
4963-category_id: network_manager
4964-plugin: manual
4965-_summary: Ethernet port has wake-on-lan enabled by default
4966-_purpose:
4967- Check if the actual ethernet device has wake-on-lan correctly enabled when
4968- its connection is maintained by NetworkManager.
4969-_steps:
4970- 1. Install the se-test-tools snap
4971- $ snap install --devmode --edge se-test-tools
4972- 2. Check the ethernet port for the wake-on-lan setting (eth0 in this case)
4973- $ sudo se-test-tools.ethtool eth0
4974-_verification:
4975- The output should be similar to this:
4976- Settings for eth0:
4977- [...]
4978- Supports Wake-on: pumbg
4979- Wake-on: g
4980- [...]
4981- .
4982- The relevant line is the "Wake-on:" one. It should have the value "g"
4983- set which marks the port as waking up on the magic packet.
4984-
4985-id: network_manager/ethernet/wakes_up_with_wol
4986-depends: network_manager/ethernet/device_supports_wol
4987-category_id: network_manager
4988-plugin: manual
4989-_summary: Wake on LAN configured by NetworkManager can wake up the device
4990-_purpose:
4991- Check that another system can wake up from S5 the SUT using the connected ethernet port.
4992-_steps:
4993- 1. Ensure there is an ethernet cable attached to one of the ports and it's configured via
4994- NetworkManager. Check with
4995- $ network-manager.nmcli d | grep eth0
4996- 2. Note the MAC address of the the eth0 port
4997- $ ifconfig eth0
4998- 3. Power off the system by running
4999- $ sudo poweroff
5000- 4. From another computer on the same network run the following command:
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches