Merge ~gary-wzl77/snappy-hwe-snaps/+git/engineering-tests:easy-openvpn into ~snappy-hwe-team/snappy-hwe-snaps/+git/easy-openvpn:master

Proposed by Gary.Wang on 2017-09-07
Status: Superseded
Proposed branch: ~gary-wzl77/snappy-hwe-snaps/+git/engineering-tests:easy-openvpn
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/easy-openvpn:master
Diff against target: 4931 lines (+4565/-0) (has conflicts)
56 files modified
.ci_tests_disabled (+1/-0)
.gitignore (+7/-0)
COPYING (+674/-0)
MAINTAINERS (+5/-0)
README.md (+82/-0)
bin/plainbox-wrapper (+3/-0)
bin/run-alsa-utils-tests (+5/-0)
bin/run-bluez-tests (+5/-0)
bin/run-captive-redirect-tests (+5/-0)
bin/run-easy-openvpn-tests (+5/-0)
bin/run-media-hub-tests (+5/-0)
bin/run-modem-manager-tests (+5/-0)
bin/run-network-manager-tests (+5/-0)
bin/run-pulseaudio-tests (+5/-0)
bin/run-serial-vault-tests (+5/-0)
bin/run-snapweb-tests (+5/-0)
bin/run-tests (+5/-0)
bin/run-tpm-tests (+5/-0)
bin/run-udisks2-tests (+5/-0)
bin/run-upower-tests (+5/-0)
bin/run-wifi-ap-tests (+5/-0)
bin/run-wifi-connect-tests (+5/-0)
bin/run-wireless-tools-tests (+5/-0)
bin/run-wpa-supplicant-tests (+5/-0)
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/easy-openvpn/easy-openvpn.pxu (+163/-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 (+379/-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/serial-vault/serial-vault.pxu (+132/-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)
snapcraft.yaml (+80/-0)
Conflict in .gitignore
Conflict in MAINTAINERS
Conflict in README.md
Conflict in snapcraft.yaml
Reviewer Review Type Date Requested Status
Snappy HWE Team 2017-09-07 Pending
Review via email: mp+330324@code.launchpad.net

This proposal has been superseded by a proposal from 2017-09-07.

Commit message

*.Add easy-openvpn plainbox test cases.
*.Unify tests launch command.

Description of the change

*.Add easy-openvpn plainbox test cases.
*.Unify tests launch command.

To post a comment you must log in.

Unmerged commits

53ec506... by Gary.Wang on 2017-09-07

Add easy-openvpn plainbox test cases.

*.Add easy-openvpn plainbox test cases.
*.Unify tests launch command.

f7f5a4a... by System Enablement CI Bot <email address hidden> on 2017-09-06

Merge remote tracking branch serial-vault-corrections

Merge-Proposal: https://code.launchpad.net/~rmescandon/snappy-hwe-snaps/+git/engineering-tests/+merge/330265

Author: Roberto Mier Escandón  <email address hidden>

- Renamed back serial-vault-server to serial-vault
- Padding adjustment
- Updated some not correct tests content
- Verified manually everything

943b774... by Roberto Mier Escandón  on 2017-09-06

simplifying operation of checking connected interfaces

62e542a... by Roberto Mier Escandón  on 2017-09-06

corrections of padding and some content in the tests after manually verifying

9d7d0c0... by System Enablement CI Bot <email address hidden> on 2017-09-06

Merge remote tracking branch serial-vault-ones

Merge-Proposal: https://code.launchpad.net/~rmescandon/snappy-hwe-snaps/+git/engineering-tests/+merge/330071

Author: Roberto Mier Escandón  <email address hidden>

Serial vault plainbox tests

7c24479... by System Enablement CI Bot <email address hidden> on 2017-09-04

Merge remote tracking branch nm-debug-config-test

Merge-Proposal: https://code.launchpad.net/~rmescandon/snappy-hwe-snaps/+git/engineering-tests/+merge/327102

Author: Roberto Mier Escandón  <email address hidden>

Plainbox tests for network manager debug enable/disable config option

ec12899... by Roberto Mier Escandón  on 2017-09-01

added serial vault plainbox tests

a09e2d8... by Roberto Mier Escandón  on 2017-09-01

Merge branch 'master' into nm-debug-config-test

fe7eda6... by Roberto Mier Escandón  on 2017-09-01

fixed typo

85bcdb9... by System Enablement CI Bot <email address hidden> on 2017-08-29

Merge remote tracking branch one-provider

Merge-Proposal: https://code.launchpad.net/~kissiel/snappy-hwe-snaps/+git/engineering-tests/+merge/328813

Author: Maciej Kisielewski <email address hidden>

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, ...)

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: