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
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 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

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>

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 Escandon

simplifying operation of checking connected interfaces

62e542a... by Roberto Mier Escandon

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

9d7d0c0... by System Enablement CI Bot <email address hidden>

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>

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 Escandon

added serial vault plainbox tests

a09e2d8... by Roberto Mier Escandon

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

fe7eda6... by Roberto Mier Escandon

fixed typo

85bcdb9... by System Enablement CI Bot <email address hidden>

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
diff --git a/.ci_tests_disabled b/.ci_tests_disabled
0new file mode 1006440new file mode 100644
index 0000000..b7db254
--- /dev/null
+++ b/.ci_tests_disabled
@@ -0,0 +1 @@
1# Empty
diff --git a/.gitignore b/.gitignore
index a21d85c..322b331 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
1<<<<<<< .gitignore
1/*.snap2/*.snap
2/parts3/parts
3/prime4/prime
@@ -5,3 +6,9 @@
5/snap/plugins/__pycache__/6/snap/plugins/__pycache__/
6/snap/.snapcraft/7/snap/.snapcraft/
7.tests-extras8.tests-extras
9=======
10canonical-se-engineering-tests_*.snap
11parts/
12prime/
13stage/
14>>>>>>> .gitignore
diff --git a/COPYING b/COPYING
8new file mode 10064415new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The GNU General Public License is a free, copyleft license for
11software and other kinds of works.
12
13 The licenses for most software and other practical works are designed
14to take away your freedom to share and change the works. By contrast,
15the GNU General Public License is intended to guarantee your freedom to
16share and change all versions of a program--to make sure it remains free
17software for all its users. We, the Free Software Foundation, use the
18GNU General Public License for most of our software; it applies also to
19any other work released this way by its authors. You can apply it to
20your programs, too.
21
22 When we speak of free software, we are referring to freedom, not
23price. Our General Public Licenses are designed to make sure that you
24have the freedom to distribute copies of free software (and charge for
25them if you wish), that you receive source code or can get it if you
26want it, that you can change the software or use pieces of it in new
27free programs, and that you know you can do these things.
28
29 To protect your rights, we need to prevent others from denying you
30these rights or asking you to surrender the rights. Therefore, you have
31certain responsibilities if you distribute copies of the software, or if
32you modify it: responsibilities to respect the freedom of others.
33
34 For example, if you distribute copies of such a program, whether
35gratis or for a fee, you must pass on to the recipients the same
36freedoms that you received. You must make sure that they, too, receive
37or can get the source code. And you must show them these terms so they
38know their rights.
39
40 Developers that use the GNU GPL protect your rights with two steps:
41(1) assert copyright on the software, and (2) offer you this License
42giving you legal permission to copy, distribute and/or modify it.
43
44 For the developers' and authors' protection, the GPL clearly explains
45that there is no warranty for this free software. For both users' and
46authors' sake, the GPL requires that modified versions be marked as
47changed, so that their problems will not be attributed erroneously to
48authors of previous versions.
49
50 Some devices are designed to deny users access to install or run
51modified versions of the software inside them, although the manufacturer
52can do so. This is fundamentally incompatible with the aim of
53protecting users' freedom to change the software. The systematic
54pattern of such abuse occurs in the area of products for individuals to
55use, which is precisely where it is most unacceptable. Therefore, we
56have designed this version of the GPL to prohibit the practice for those
57products. If such problems arise substantially in other domains, we
58stand ready to extend this provision to those domains in future versions
59of the GPL, as needed to protect the freedom of users.
60
61 Finally, every program is threatened constantly by software patents.
62States should not allow patents to restrict development and use of
63software on general-purpose computers, but in those that do, we wish to
64avoid the special danger that patents applied to a free program could
65make it effectively proprietary. To prevent this, the GPL assures that
66patents cannot be used to render the program non-free.
67
68 The precise terms and conditions for copying, distribution and
69modification follow.
70
71 TERMS AND CONDITIONS
72
73 0. Definitions.
74
75 "This License" refers to version 3 of the GNU General Public License.
76
77 "Copyright" also means copyright-like laws that apply to other kinds of
78works, such as semiconductor masks.
79
80 "The Program" refers to any copyrightable work licensed under this
81License. Each licensee is addressed as "you". "Licensees" and
82"recipients" may be individuals or organizations.
83
84 To "modify" a work means to copy from or adapt all or part of the work
85in a fashion requiring copyright permission, other than the making of an
86exact copy. The resulting work is called a "modified version" of the
87earlier work or a work "based on" the earlier work.
88
89 A "covered work" means either the unmodified Program or a work based
90on the Program.
91
92 To "propagate" a work means to do anything with it that, without
93permission, would make you directly or secondarily liable for
94infringement under applicable copyright law, except executing it on a
95computer or modifying a private copy. Propagation includes copying,
96distribution (with or without modification), making available to the
97public, and in some countries other activities as well.
98
99 To "convey" a work means any kind of propagation that enables other
100parties to make or receive copies. Mere interaction with a user through
101a computer network, with no transfer of a copy, is not conveying.
102
103 An interactive user interface displays "Appropriate Legal Notices"
104to the extent that it includes a convenient and prominently visible
105feature that (1) displays an appropriate copyright notice, and (2)
106tells the user that there is no warranty for the work (except to the
107extent that warranties are provided), that licensees may convey the
108work under this License, and how to view a copy of this License. If
109the interface presents a list of user commands or options, such as a
110menu, a prominent item in the list meets this criterion.
111
112 1. Source Code.
113
114 The "source code" for a work means the preferred form of the work
115for making modifications to it. "Object code" means any non-source
116form of a work.
117
118 A "Standard Interface" means an interface that either is an official
119standard defined by a recognized standards body, or, in the case of
120interfaces specified for a particular programming language, one that
121is widely used among developers working in that language.
122
123 The "System Libraries" of an executable work include anything, other
124than the work as a whole, that (a) is included in the normal form of
125packaging a Major Component, but which is not part of that Major
126Component, and (b) serves only to enable use of the work with that
127Major Component, or to implement a Standard Interface for which an
128implementation is available to the public in source code form. A
129"Major Component", in this context, means a major essential component
130(kernel, window system, and so on) of the specific operating system
131(if any) on which the executable work runs, or a compiler used to
132produce the work, or an object code interpreter used to run it.
133
134 The "Corresponding Source" for a work in object code form means all
135the source code needed to generate, install, and (for an executable
136work) run the object code and to modify the work, including scripts to
137control those activities. However, it does not include the work's
138System Libraries, or general-purpose tools or generally available free
139programs which are used unmodified in performing those activities but
140which are not part of the work. For example, Corresponding Source
141includes interface definition files associated with source files for
142the work, and the source code for shared libraries and dynamically
143linked subprograms that the work is specifically designed to require,
144such as by intimate data communication or control flow between those
145subprograms and other parts of the work.
146
147 The Corresponding Source need not include anything that users
148can regenerate automatically from other parts of the Corresponding
149Source.
150
151 The Corresponding Source for a work in source code form is that
152same work.
153
154 2. Basic Permissions.
155
156 All rights granted under this License are granted for the term of
157copyright on the Program, and are irrevocable provided the stated
158conditions are met. This License explicitly affirms your unlimited
159permission to run the unmodified Program. The output from running a
160covered work is covered by this License only if the output, given its
161content, constitutes a covered work. This License acknowledges your
162rights of fair use or other equivalent, as provided by copyright law.
163
164 You may make, run and propagate covered works that you do not
165convey, without conditions so long as your license otherwise remains
166in force. You may convey covered works to others for the sole purpose
167of having them make modifications exclusively for you, or provide you
168with facilities for running those works, provided that you comply with
169the terms of this License in conveying all material for which you do
170not control copyright. Those thus making or running the covered works
171for you must do so exclusively on your behalf, under your direction
172and control, on terms that prohibit them from making any copies of
173your copyrighted material outside their relationship with you.
174
175 Conveying under any other circumstances is permitted solely under
176the conditions stated below. Sublicensing is not allowed; section 10
177makes it unnecessary.
178
179 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
181 No covered work shall be deemed part of an effective technological
182measure under any applicable law fulfilling obligations under article
18311 of the WIPO copyright treaty adopted on 20 December 1996, or
184similar laws prohibiting or restricting circumvention of such
185measures.
186
187 When you convey a covered work, you waive any legal power to forbid
188circumvention of technological measures to the extent such circumvention
189is effected by exercising rights under this License with respect to
190the covered work, and you disclaim any intention to limit operation or
191modification of the work as a means of enforcing, against the work's
192users, your or third parties' legal rights to forbid circumvention of
193technological measures.
194
195 4. Conveying Verbatim Copies.
196
197 You may convey verbatim copies of the Program's source code as you
198receive it, in any medium, provided that you conspicuously and
199appropriately publish on each copy an appropriate copyright notice;
200keep intact all notices stating that this License and any
201non-permissive terms added in accord with section 7 apply to the code;
202keep intact all notices of the absence of any warranty; and give all
203recipients a copy of this License along with the Program.
204
205 You may charge any price or no price for each copy that you convey,
206and you may offer support or warranty protection for a fee.
207
208 5. Conveying Modified Source Versions.
209
210 You may convey a work based on the Program, or the modifications to
211produce it from the Program, in the form of source code under the
212terms of section 4, provided that you also meet all of these conditions:
213
214 a) The work must carry prominent notices stating that you modified
215 it, and giving a relevant date.
216
217 b) The work must carry prominent notices stating that it is
218 released under this License and any conditions added under section
219 7. This requirement modifies the requirement in section 4 to
220 "keep intact all notices".
221
222 c) You must license the entire work, as a whole, under this
223 License to anyone who comes into possession of a copy. This
224 License will therefore apply, along with any applicable section 7
225 additional terms, to the whole of the work, and all its parts,
226 regardless of how they are packaged. This License gives no
227 permission to license the work in any other way, but it does not
228 invalidate such permission if you have separately received it.
229
230 d) If the work has interactive user interfaces, each must display
231 Appropriate Legal Notices; however, if the Program has interactive
232 interfaces that do not display Appropriate Legal Notices, your
233 work need not make them do so.
234
235 A compilation of a covered work with other separate and independent
236works, which are not by their nature extensions of the covered work,
237and which are not combined with it such as to form a larger program,
238in or on a volume of a storage or distribution medium, is called an
239"aggregate" if the compilation and its resulting copyright are not
240used to limit the access or legal rights of the compilation's users
241beyond what the individual works permit. Inclusion of a covered work
242in an aggregate does not cause this License to apply to the other
243parts of the aggregate.
244
245 6. Conveying Non-Source Forms.
246
247 You may convey a covered work in object code form under the terms
248of sections 4 and 5, provided that you also convey the
249machine-readable Corresponding Source under the terms of this License,
250in one of these ways:
251
252 a) Convey the object code in, or embodied in, a physical product
253 (including a physical distribution medium), accompanied by the
254 Corresponding Source fixed on a durable physical medium
255 customarily used for software interchange.
256
257 b) Convey the object code in, or embodied in, a physical product
258 (including a physical distribution medium), accompanied by a
259 written offer, valid for at least three years and valid for as
260 long as you offer spare parts or customer support for that product
261 model, to give anyone who possesses the object code either (1) a
262 copy of the Corresponding Source for all the software in the
263 product that is covered by this License, on a durable physical
264 medium customarily used for software interchange, for a price no
265 more than your reasonable cost of physically performing this
266 conveying of source, or (2) access to copy the
267 Corresponding Source from a network server at no charge.
268
269 c) Convey individual copies of the object code with a copy of the
270 written offer to provide the Corresponding Source. This
271 alternative is allowed only occasionally and noncommercially, and
272 only if you received the object code with such an offer, in accord
273 with subsection 6b.
274
275 d) Convey the object code by offering access from a designated
276 place (gratis or for a charge), and offer equivalent access to the
277 Corresponding Source in the same way through the same place at no
278 further charge. You need not require recipients to copy the
279 Corresponding Source along with the object code. If the place to
280 copy the object code is a network server, the Corresponding Source
281 may be on a different server (operated by you or a third party)
282 that supports equivalent copying facilities, provided you maintain
283 clear directions next to the object code saying where to find the
284 Corresponding Source. Regardless of what server hosts the
285 Corresponding Source, you remain obligated to ensure that it is
286 available for as long as needed to satisfy these requirements.
287
288 e) Convey the object code using peer-to-peer transmission, provided
289 you inform other peers where the object code and Corresponding
290 Source of the work are being offered to the general public at no
291 charge under subsection 6d.
292
293 A separable portion of the object code, whose source code is excluded
294from the Corresponding Source as a System Library, need not be
295included in conveying the object code work.
296
297 A "User Product" is either (1) a "consumer product", which means any
298tangible personal property which is normally used for personal, family,
299or household purposes, or (2) anything designed or sold for incorporation
300into a dwelling. In determining whether a product is a consumer product,
301doubtful cases shall be resolved in favor of coverage. For a particular
302product received by a particular user, "normally used" refers to a
303typical or common use of that class of product, regardless of the status
304of the particular user or of the way in which the particular user
305actually uses, or expects or is expected to use, the product. A product
306is a consumer product regardless of whether the product has substantial
307commercial, industrial or non-consumer uses, unless such uses represent
308the only significant mode of use of the product.
309
310 "Installation Information" for a User Product means any methods,
311procedures, authorization keys, or other information required to install
312and execute modified versions of a covered work in that User Product from
313a modified version of its Corresponding Source. The information must
314suffice to ensure that the continued functioning of the modified object
315code is in no case prevented or interfered with solely because
316modification has been made.
317
318 If you convey an object code work under this section in, or with, or
319specifically for use in, a User Product, and the conveying occurs as
320part of a transaction in which the right of possession and use of the
321User Product is transferred to the recipient in perpetuity or for a
322fixed term (regardless of how the transaction is characterized), the
323Corresponding Source conveyed under this section must be accompanied
324by the Installation Information. But this requirement does not apply
325if neither you nor any third party retains the ability to install
326modified object code on the User Product (for example, the work has
327been installed in ROM).
328
329 The requirement to provide Installation Information does not include a
330requirement to continue to provide support service, warranty, or updates
331for a work that has been modified or installed by the recipient, or for
332the User Product in which it has been modified or installed. Access to a
333network may be denied when the modification itself materially and
334adversely affects the operation of the network or violates the rules and
335protocols for communication across the network.
336
337 Corresponding Source conveyed, and Installation Information provided,
338in accord with this section must be in a format that is publicly
339documented (and with an implementation available to the public in
340source code form), and must require no special password or key for
341unpacking, reading or copying.
342
343 7. Additional Terms.
344
345 "Additional permissions" are terms that supplement the terms of this
346License by making exceptions from one or more of its conditions.
347Additional permissions that are applicable to the entire Program shall
348be treated as though they were included in this License, to the extent
349that they are valid under applicable law. If additional permissions
350apply only to part of the Program, that part may be used separately
351under those permissions, but the entire Program remains governed by
352this License without regard to the additional permissions.
353
354 When you convey a copy of a covered work, you may at your option
355remove any additional permissions from that copy, or from any part of
356it. (Additional permissions may be written to require their own
357removal in certain cases when you modify the work.) You may place
358additional permissions on material, added by you to a covered work,
359for which you have or can give appropriate copyright permission.
360
361 Notwithstanding any other provision of this License, for material you
362add to a covered work, you may (if authorized by the copyright holders of
363that material) supplement the terms of this License with terms:
364
365 a) Disclaiming warranty or limiting liability differently from the
366 terms of sections 15 and 16 of this License; or
367
368 b) Requiring preservation of specified reasonable legal notices or
369 author attributions in that material or in the Appropriate Legal
370 Notices displayed by works containing it; or
371
372 c) Prohibiting misrepresentation of the origin of that material, or
373 requiring that modified versions of such material be marked in
374 reasonable ways as different from the original version; or
375
376 d) Limiting the use for publicity purposes of names of licensors or
377 authors of the material; or
378
379 e) Declining to grant rights under trademark law for use of some
380 trade names, trademarks, or service marks; or
381
382 f) Requiring indemnification of licensors and authors of that
383 material by anyone who conveys the material (or modified versions of
384 it) with contractual assumptions of liability to the recipient, for
385 any liability that these contractual assumptions directly impose on
386 those licensors and authors.
387
388 All other non-permissive additional terms are considered "further
389restrictions" within the meaning of section 10. If the Program as you
390received it, or any part of it, contains a notice stating that it is
391governed by this License along with a term that is a further
392restriction, you may remove that term. If a license document contains
393a further restriction but permits relicensing or conveying under this
394License, you may add to a covered work material governed by the terms
395of that license document, provided that the further restriction does
396not survive such relicensing or conveying.
397
398 If you add terms to a covered work in accord with this section, you
399must place, in the relevant source files, a statement of the
400additional terms that apply to those files, or a notice indicating
401where to find the applicable terms.
402
403 Additional terms, permissive or non-permissive, may be stated in the
404form of a separately written license, or stated as exceptions;
405the above requirements apply either way.
406
407 8. Termination.
408
409 You may not propagate or modify a covered work except as expressly
410provided under this License. Any attempt otherwise to propagate or
411modify it is void, and will automatically terminate your rights under
412this License (including any patent licenses granted under the third
413paragraph of section 11).
414
415 However, if you cease all violation of this License, then your
416license from a particular copyright holder is reinstated (a)
417provisionally, unless and until the copyright holder explicitly and
418finally terminates your license, and (b) permanently, if the copyright
419holder fails to notify you of the violation by some reasonable means
420prior to 60 days after the cessation.
421
422 Moreover, your license from a particular copyright holder is
423reinstated permanently if the copyright holder notifies you of the
424violation by some reasonable means, this is the first time you have
425received notice of violation of this License (for any work) from that
426copyright holder, and you cure the violation prior to 30 days after
427your receipt of the notice.
428
429 Termination of your rights under this section does not terminate the
430licenses of parties who have received copies or rights from you under
431this License. If your rights have been terminated and not permanently
432reinstated, you do not qualify to receive new licenses for the same
433material under section 10.
434
435 9. Acceptance Not Required for Having Copies.
436
437 You are not required to accept this License in order to receive or
438run a copy of the Program. Ancillary propagation of a covered work
439occurring solely as a consequence of using peer-to-peer transmission
440to receive a copy likewise does not require acceptance. However,
441nothing other than this License grants you permission to propagate or
442modify any covered work. These actions infringe copyright if you do
443not accept this License. Therefore, by modifying or propagating a
444covered work, you indicate your acceptance of this License to do so.
445
446 10. Automatic Licensing of Downstream Recipients.
447
448 Each time you convey a covered work, the recipient automatically
449receives a license from the original licensors, to run, modify and
450propagate that work, subject to this License. You are not responsible
451for enforcing compliance by third parties with this License.
452
453 An "entity transaction" is a transaction transferring control of an
454organization, or substantially all assets of one, or subdividing an
455organization, or merging organizations. If propagation of a covered
456work results from an entity transaction, each party to that
457transaction who receives a copy of the work also receives whatever
458licenses to the work the party's predecessor in interest had or could
459give under the previous paragraph, plus a right to possession of the
460Corresponding Source of the work from the predecessor in interest, if
461the predecessor has it or can get it with reasonable efforts.
462
463 You may not impose any further restrictions on the exercise of the
464rights granted or affirmed under this License. For example, you may
465not impose a license fee, royalty, or other charge for exercise of
466rights granted under this License, and you may not initiate litigation
467(including a cross-claim or counterclaim in a lawsuit) alleging that
468any patent claim is infringed by making, using, selling, offering for
469sale, or importing the Program or any portion of it.
470
471 11. Patents.
472
473 A "contributor" is a copyright holder who authorizes use under this
474License of the Program or a work on which the Program is based. The
475work thus licensed is called the contributor's "contributor version".
476
477 A contributor's "essential patent claims" are all patent claims
478owned or controlled by the contributor, whether already acquired or
479hereafter acquired, that would be infringed by some manner, permitted
480by this License, of making, using, or selling its contributor version,
481but do not include claims that would be infringed only as a
482consequence of further modification of the contributor version. For
483purposes of this definition, "control" includes the right to grant
484patent sublicenses in a manner consistent with the requirements of
485this License.
486
487 Each contributor grants you a non-exclusive, worldwide, royalty-free
488patent license under the contributor's essential patent claims, to
489make, use, sell, offer for sale, import and otherwise run, modify and
490propagate the contents of its contributor version.
491
492 In the following three paragraphs, a "patent license" is any express
493agreement or commitment, however denominated, not to enforce a patent
494(such as an express permission to practice a patent or covenant not to
495sue for patent infringement). To "grant" such a patent license to a
496party means to make such an agreement or commitment not to enforce a
497patent against the party.
498
499 If you convey a covered work, knowingly relying on a patent license,
500and the Corresponding Source of the work is not available for anyone
501to copy, free of charge and under the terms of this License, through a
502publicly available network server or other readily accessible means,
503then you must either (1) cause the Corresponding Source to be so
504available, or (2) arrange to deprive yourself of the benefit of the
505patent license for this particular work, or (3) arrange, in a manner
506consistent with the requirements of this License, to extend the patent
507license to downstream recipients. "Knowingly relying" means you have
508actual knowledge that, but for the patent license, your conveying the
509covered work in a country, or your recipient's use of the covered work
510in a country, would infringe one or more identifiable patents in that
511country that you have reason to believe are valid.
512
513 If, pursuant to or in connection with a single transaction or
514arrangement, you convey, or propagate by procuring conveyance of, a
515covered work, and grant a patent license to some of the parties
516receiving the covered work authorizing them to use, propagate, modify
517or convey a specific copy of the covered work, then the patent license
518you grant is automatically extended to all recipients of the covered
519work and works based on it.
520
521 A patent license is "discriminatory" if it does not include within
522the scope of its coverage, prohibits the exercise of, or is
523conditioned on the non-exercise of one or more of the rights that are
524specifically granted under this License. You may not convey a covered
525work if you are a party to an arrangement with a third party that is
526in the business of distributing software, under which you make payment
527to the third party based on the extent of your activity of conveying
528the work, and under which the third party grants, to any of the
529parties who would receive the covered work from you, a discriminatory
530patent license (a) in connection with copies of the covered work
531conveyed by you (or copies made from those copies), or (b) primarily
532for and in connection with specific products or compilations that
533contain the covered work, unless you entered into that arrangement,
534or that patent license was granted, prior to 28 March 2007.
535
536 Nothing in this License shall be construed as excluding or limiting
537any implied license or other defenses to infringement that may
538otherwise be available to you under applicable patent law.
539
540 12. No Surrender of Others' Freedom.
541
542 If conditions are imposed on you (whether by court order, agreement or
543otherwise) that contradict the conditions of this License, they do not
544excuse you from the conditions of this License. If you cannot convey a
545covered work so as to satisfy simultaneously your obligations under this
546License and any other pertinent obligations, then as a consequence you may
547not convey it at all. For example, if you agree to terms that obligate you
548to collect a royalty for further conveying from those to whom you convey
549the Program, the only way you could satisfy both those terms and this
550License would be to refrain entirely from conveying the Program.
551
552 13. Use with the GNU Affero General Public License.
553
554 Notwithstanding any other provision of this License, you have
555permission to link or combine any covered work with a work licensed
556under version 3 of the GNU Affero General Public License into a single
557combined work, and to convey the resulting work. The terms of this
558License will continue to apply to the part which is the covered work,
559but the special requirements of the GNU Affero General Public License,
560section 13, concerning interaction through a network will apply to the
561combination as such.
562
563 14. Revised Versions of this License.
564
565 The Free Software Foundation may publish revised and/or new versions of
566the GNU General Public License from time to time. Such new versions will
567be similar in spirit to the present version, but may differ in detail to
568address new problems or concerns.
569
570 Each version is given a distinguishing version number. If the
571Program specifies that a certain numbered version of the GNU General
572Public License "or any later version" applies to it, you have the
573option of following the terms and conditions either of that numbered
574version or of any later version published by the Free Software
575Foundation. If the Program does not specify a version number of the
576GNU General Public License, you may choose any version ever published
577by the Free Software Foundation.
578
579 If the Program specifies that a proxy can decide which future
580versions of the GNU General Public License can be used, that proxy's
581public statement of acceptance of a version permanently authorizes you
582to choose that version for the Program.
583
584 Later license versions may give you additional or different
585permissions. However, no additional obligations are imposed on any
586author or copyright holder as a result of your choosing to follow a
587later version.
588
589 15. Disclaimer of Warranty.
590
591 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
600 16. Limitation of Liability.
601
602 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610SUCH DAMAGES.
611
612 17. Interpretation of Sections 15 and 16.
613
614 If the disclaimer of warranty and limitation of liability provided
615above cannot be given local legal effect according to their terms,
616reviewing courts shall apply local law that most closely approximates
617an absolute waiver of all civil liability in connection with the
618Program, unless a warranty or assumption of liability accompanies a
619copy of the Program in return for a fee.
620
621 END OF TERMS AND CONDITIONS
622
623 How to Apply These Terms to Your New Programs
624
625 If you develop a new program, and you want it to be of the greatest
626possible use to the public, the best way to achieve this is to make it
627free software which everyone can redistribute and change under these terms.
628
629 To do so, attach the following notices to the program. It is safest
630to attach them to the start of each source file to most effectively
631state the exclusion of warranty; and each file should have at least
632the "copyright" line and a pointer to where the full notice is found.
633
634 <one line to give the program's name and a brief idea of what it does.>
635 Copyright (C) <year> <name of author>
636
637 This program is free software: you can redistribute it and/or modify
638 it under the terms of the GNU General Public License as published by
639 the Free Software Foundation, either version 3 of the License, or
640 (at your option) any later version.
641
642 This program is distributed in the hope that it will be useful,
643 but WITHOUT ANY WARRANTY; without even the implied warranty of
644 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 GNU General Public License for more details.
646
647 You should have received a copy of the GNU General Public License
648 along with this program. If not, see <http://www.gnu.org/licenses/>.
649
650Also add information on how to contact you by electronic and paper mail.
651
652 If the program does terminal interaction, make it output a short
653notice like this when it starts in an interactive mode:
654
655 <program> Copyright (C) <year> <name of author>
656 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 This is free software, and you are welcome to redistribute it
658 under certain conditions; type `show c' for details.
659
660The hypothetical commands `show w' and `show c' should show the appropriate
661parts of the General Public License. Of course, your program's commands
662might be different; for a GUI interface, you would use an "about box".
663
664 You should also get your employer (if you work as a programmer) or school,
665if any, to sign a "copyright disclaimer" for the program, if necessary.
666For more information on this, and how to apply and follow the GNU GPL, see
667<http://www.gnu.org/licenses/>.
668
669 The GNU General Public License does not permit incorporating your program
670into proprietary programs. If your program is a subroutine library, you
671may consider it more useful to permit linking proprietary applications with
672the library. If this is what you want to do, use the GNU Lesser General
673Public License instead of this License. But first, please read
674<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/MAINTAINERS b/MAINTAINERS
index b9d3341..28c67ed 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1,2 +1,7 @@
1<<<<<<< MAINTAINERS
1Casey Marshall <casey.marshall@canonical.com>2Casey Marshall <casey.marshall@canonical.com>
2Gary Wang <gary.wang@canonical.com>3Gary Wang <gary.wang@canonical.com>
4=======
5Jim Hodapp <jim.hodapp@canonical.com>
6Simon Fels <simon.fels@canonical.com>
7>>>>>>> MAINTAINERS
diff --git a/README.md b/README.md
index 120c043..e9488b8 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
1<<<<<<< README.md
1# Easy OpenVPN2# Easy OpenVPN
23
3This project builds a snap for easy OpenVPN setup and installation. It was4This project builds a snap for easy OpenVPN setup and installation. It was
@@ -97,3 +98,84 @@ This will run the test case under spread/main/installation folder.
97You can specify the `SNAP_CHANNEL` environment variable to install a snap from a specific channel for the testing as well.98You can specify the `SNAP_CHANNEL` environment variable to install a snap from a specific channel for the testing as well.
9899
99 $ SNAP_CHANNEL=candidate spread spread/main/installation100 $ SNAP_CHANNEL=candidate spread spread/main/installation
101=======
102# canonical-se-engineering-tests
103
104Engineering tests for the System Enablement team
105
106## What is this?
107
108A snap providing a set of tests to verify functionality of
109the snaps produced by the System Enablement team at Canonical.
110
111It currently covers test cases for the following snaps
112
113 * alsa-utils
114 * bluez
115 * captive-redirect
116 * modem-manager
117 * network-manager
118 * pulse-audio
119 * tpm1.2
120 * udisks2
121 * upower
122 * wifi-ap
123 * wifi-connect
124 * wireless-tools
125 * wpa-supplicant
126 * media-hub
127 * snapweb
128 * serial-vault
129 * easy-openvpn
130
131
132## How can I run the tests?
133
134First you have to install the current version of the snap from
135the public Ubuntu store or take a self built one.
136
137 $ sudo snap install canonical-se-engineering-tests
138
139Also make sure to install the prerequisite snap packages before
140running the tests:
141
142 $ sudo snap install bluez modem-manager network-manager
143
144TODO The media-hub framework is not yet snapified. Instructions need to
145be added here when that happens.
146
147Afterwards you have new commands available in /snap/bin you
148can use to run all available test cases. The first command
149runs all of the tests and the other ones run individual test
150categories related to the command's name.
151
152 $ /snap/bin/canonical-se-engineering-tests.alsa-utils
153 $ /snap/bin/canonical-se-engineering-tests.bluez
154 $ /snap/bin/canonical-se-engineering-tests.media-hub
155 $ /snap/bin/canonical-se-engineering-tests.modem-manager
156 $ /snap/bin/canonical-se-engineering-tests.network-manager
157 $ /snap/bin/canonical-se-engineering-tests.plainbox
158 $ /snap/bin/canonical-se-engineering-tests.pulseaudio
159 $ /snap/bin/canonical-se-engineering-tests.tpm
160 $ /snap/bin/canonical-se-engineering-tests.udisks2
161 $ /snap/bin/canonical-se-engineering-tests.upower
162 $ /snap/bin/canonical-se-engineering-tests.wifi-ap
163 $ /snap/bin/canonical-se-engineering-tests.wifi-connect
164 $ /snap/bin/canonical-se-engineering-tests.wireless-tools
165 $ /snap/bin/canonical-se-engineering-tests.snapweb
166 $ /snap/bin/canonical-se-engineering-tests.easy-openvpn
167
168## How can I contribute new tests?
169
170If you want to add tests you can get a introduction in the
171underlying framework plainbox on its documentation website
172at https://plainbox.readthedocs.io/en/latest/
173
174All tests are currently stored in the subdirectory tests/unit
175of this git repository. We currently add a single .pxu file
176per snap but this can easily change when necessary.
177
178Once you've implemented your tests you can send them for
179inclusion as merge proposal against the launchpad git
180repository lp:~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests
181>>>>>>> README.md
diff --git a/bin/plainbox-wrapper b/bin/plainbox-wrapper
100new file mode 100755182new file mode 100755
index 0000000..444a758
--- /dev/null
+++ b/bin/plainbox-wrapper
@@ -0,0 +1,3 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) "$@"
diff --git a/bin/run-alsa-utils-tests b/bin/run-alsa-utils-tests
0new file mode 1007554new file mode 100755
index 0000000..d22e3cb
--- /dev/null
+++ b/bin/run-alsa-utils-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::alsa_utils.*' \
5 "$@"
diff --git a/bin/run-bluez-tests b/bin/run-bluez-tests
0new file mode 1007556new file mode 100755
index 0000000..dee47c0
--- /dev/null
+++ b/bin/run-bluez-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::bluez.*' \
5 "$@"
diff --git a/bin/run-captive-redirect-tests b/bin/run-captive-redirect-tests
0new file mode 1007556new file mode 100755
index 0000000..3887d71
--- /dev/null
+++ b/bin/run-captive-redirect-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::captive_redirect.*' \
5 "$@"
diff --git a/bin/run-easy-openvpn-tests b/bin/run-easy-openvpn-tests
0new file mode 1007556new file mode 100755
index 0000000..1a5f2ae
--- /dev/null
+++ b/bin/run-easy-openvpn-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::easy_openvpn.*' \
5 "$@"
diff --git a/bin/run-media-hub-tests b/bin/run-media-hub-tests
0new file mode 1007556new file mode 100755
index 0000000..295c791
--- /dev/null
+++ b/bin/run-media-hub-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::media_hub.*' \
5 "$@"
diff --git a/bin/run-modem-manager-tests b/bin/run-modem-manager-tests
0new file mode 1007556new file mode 100755
index 0000000..3233da5
--- /dev/null
+++ b/bin/run-modem-manager-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::modem_manager.*' \
5 "$@"
diff --git a/bin/run-network-manager-tests b/bin/run-network-manager-tests
0new file mode 1007556new file mode 100755
index 0000000..8d48253
--- /dev/null
+++ b/bin/run-network-manager-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::network_manager.*' \
5 "$@"
diff --git a/bin/run-pulseaudio-tests b/bin/run-pulseaudio-tests
0new file mode 1007556new file mode 100755
index 0000000..395e8eb
--- /dev/null
+++ b/bin/run-pulseaudio-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::pulseaudio.*' \
5 "$@"
diff --git a/bin/run-serial-vault-tests b/bin/run-serial-vault-tests
0new file mode 1007556new file mode 100755
index 0000000..06537aa
--- /dev/null
+++ b/bin/run-serial-vault-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::serial_vault.*' \
5 "$@"
diff --git a/bin/run-snapweb-tests b/bin/run-snapweb-tests
0new file mode 1007556new file mode 100755
index 0000000..fcb1791
--- /dev/null
+++ b/bin/run-snapweb-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::snapweb.*' \
5 "$@"
diff --git a/bin/run-tests b/bin/run-tests
0new file mode 1007556new file mode 100755
index 0000000..bac4db2
--- /dev/null
+++ b/bin/run-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2016.com.canonical.system-enablement::.*' \
5 "$@"
diff --git a/bin/run-tpm-tests b/bin/run-tpm-tests
0new file mode 1007556new file mode 100755
index 0000000..5c08021
--- /dev/null
+++ b/bin/run-tpm-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::tpm.*' \
5 "$@"
diff --git a/bin/run-udisks2-tests b/bin/run-udisks2-tests
0new file mode 1007556new file mode 100755
index 0000000..73fac7a
--- /dev/null
+++ b/bin/run-udisks2-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::udisks2.*' \
5 "$@"
diff --git a/bin/run-upower-tests b/bin/run-upower-tests
0new file mode 1007556new file mode 100755
index 0000000..9bb3b9e
--- /dev/null
+++ b/bin/run-upower-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::upower.*' \
5 "$@"
diff --git a/bin/run-wifi-ap-tests b/bin/run-wifi-ap-tests
0new file mode 1007556new file mode 100755
index 0000000..f69ac83
--- /dev/null
+++ b/bin/run-wifi-ap-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::wifi_ap.*' \
5 "$@"
diff --git a/bin/run-wifi-connect-tests b/bin/run-wifi-connect-tests
0new file mode 1007556new file mode 100755
index 0000000..58776f1
--- /dev/null
+++ b/bin/run-wifi-connect-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::wifi-connect.*' \
5 "$@"
diff --git a/bin/run-wireless-tools-tests b/bin/run-wireless-tools-tests
0new file mode 1007556new file mode 100755
index 0000000..491c041
--- /dev/null
+++ b/bin/run-wireless-tools-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::wireless-tools.*' \
5 "$@"
diff --git a/bin/run-wpa-supplicant-tests b/bin/run-wpa-supplicant-tests
0new file mode 1007556new file mode 100755
index 0000000..7251334
--- /dev/null
+++ b/bin/run-wpa-supplicant-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2017.com.canonical.se::wpa_supplicant.*' \
5 "$@"
diff --git a/com.canonical.se:engineering-tests/manage.py b/com.canonical.se:engineering-tests/manage.py
0new file mode 1007556new file mode 100755
index 0000000..6a27365
--- /dev/null
+++ b/com.canonical.se:engineering-tests/manage.py
@@ -0,0 +1,21 @@
1#!/usr/bin/env python3
2from plainbox.provider_manager import setup, N_
3
4# You can inject other stuff here but please don't go overboard.
5#
6# In particular, if you need comprehensive compilation support to get
7# your bin/ populated then please try to discuss that with us in the
8# upstream project IRC channel #checkbox on irc.freenode.net.
9
10# NOTE: one thing that you could do here, that makes a lot of sense,
11# is to compute version somehow. This may vary depending on the
12# context of your provider. Future version of PlainBox will offer git,
13# bzr and mercurial integration using the versiontools library
14# (optional)
15
16setup(
17 name='2017.com.canonical.se:engineering-tests',
18 version="1.0",
19 description=N_("The com.canonical.se:engineering-tests provider"),
20 gettext_domain="com_canonical_se_engineering-tests",
21)
diff --git a/com.canonical.se:engineering-tests/units/alsa/base.pxu b/com.canonical.se:engineering-tests/units/alsa/base.pxu
0new file mode 10064422new file mode 100644
index 0000000..077a012
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/alsa/base.pxu
@@ -0,0 +1,47 @@
1# Copyright (c) 2017 Canonical Ltd.
2# All rights resevered.
3#
4# Written by:
5# Simon Fels <simon.fels@canonical.com>
6
7unit: category
8id: alsa_utils
9_name: Alsa utilities
10
11id: alsa_utils/setup/automatic_plug_connection
12category_id: alsa_utils
13_description:
14 Ensure that all interfaces needed by the alsa-utils snap are
15 automatically connected.
16plugin: shell
17command:
18 snap interfaces | grep -Pzq ":home +alsa-utils"
19 snap interfaces | grep -Pzq ":alsa +alsa-utils"
20estimated_duration: 1s
21flags: preserve-locale
22
23id: alsa_utils/setup/automatic_aliases
24category_id: alsa_utils
25_description:
26 Ensure that all aliases provided by the snap are automatically setup.
27plugin: shell
28command:
29 test -x /snap/bin/speaker-test
30 test -x /snap/bin/aseqnet
31 test -x /snap/bin/alsatplg
32 test -x /snap/bin/arecordmidi
33 test -x /snap/bin/amidi
34 test -x /snap/bin/alsaloop
35 test -x /snap/bin/aconnect
36 test -x /snap/bin/iecset
37 test -x /snap/bin/alsabat
38 test -x /snap/bin/aseqdump
39 test -x /snap/bin/aplaymidi
40 test -x /snap/bin/alsactl
41 test -x /snap/bin/amixer
42 test -x /snap/bin/aplay
43 test -x /snap/bin/alsaucm
44 test -x /snap/bin/alsamixer
45 test -x /snap/bin/arecord
46estimated_duration: 1s
47flags: preserve-locale
diff --git a/com.canonical.se:engineering-tests/units/alsa/device.pxu b/com.canonical.se:engineering-tests/units/alsa/device.pxu
0new file mode 10064448new file mode 100644
index 0000000..a3f7b34
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/alsa/device.pxu
@@ -0,0 +1,15 @@
1# FIXME: Convert this test back to an automated one. See LP #1665652
2id: alsa_utils/device/can_list_available_cards
3category_id: alsa_utils
4_description:
5 Validate that available ALSA sound cards can be listed with the
6 utilities the snap ships.
7plugin: manual
8_steps:
9 Execute the following command:
10 .
11 $ /snap/bin/aplay -L
12 .
13_verification:
14 Verify that the command prints out a list of available ALSA
15 devices.
diff --git a/com.canonical.se:engineering-tests/units/alsa/playback.pxu b/com.canonical.se:engineering-tests/units/alsa/playback.pxu
0new file mode 10064416new file mode 100644
index 0000000..d1a8083
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/alsa/playback.pxu
@@ -0,0 +1 @@
1# FIXME: Convert this test back to an automated one. See LP #1665652
diff --git a/com.canonical.se:engineering-tests/units/bluez/desktop.pxu b/com.canonical.se:engineering-tests/units/bluez/desktop.pxu
0new file mode 1006442new file mode 100644
index 0000000..0075fa5
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/bluez/desktop.pxu
@@ -0,0 +1,142 @@
1# Copyright (C) 2017 Canonical, Ltd.
2# All rights reserved.
3#
4# Written by:
5# Matteo Croce <matteo.croce@canonical.com>
6
7id: bluez/setup/enabled_on_boot_desktop
8category_id: bluez
9_description: Ensure that Bluetooth is enabled on boot
10plugin: manual
11_steps:
12 1. Power on the PC
13 2. If Bluetooth isn't enabled on first boot, enable it and reboot
14_verification:
15 1. Go to System Settings->Bluetooth
16 2. Check that Bluetooth kill-switch is "on"
17 3. Look at Bluetooth indicator: verify it is active and Bluetooth kill switch is "on"
18 4. Verify that Bluetooth is still enabled
19
20id: bluez/setup/discoverable_by_default_desktop
21category_id: bluez
22_description: Ensure that device is discoverable by default
23plugin: manual
24_steps:
25 1. Power on the PC
26 2. Goto System Settings->Bluetooth
27_verification:
28 In Ubuntu Touch devices the 'discoverable' option should be enabled by default,
29 in desktop devices it should not
30
31id: bluez/setup/bt_name_correct_desktop
32category_id: bluez
33_description: Ensure that the Bluetooth device name is correct
34plugin: manual
35_steps:
36 1. Power on the PC
37_verification:
38 1. Go to System Settings->Bluetooth
39 2. Verify that the Bluetooth device name is correct:
40 is set to the Ubuntu Touch device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch,
41 or to the hostname for desktop
42
43id: bluez/connection/device_cycle
44category_id: bluez
45_description: Verify that devices will reconnect after power cycle
46plugin: manual
47_steps:
48 1. Go to Unity Control Center
49 2. Click Search for devices
50 3. Put the gadget in pairing mode
51 4. Select the gadget from the list and click pair
52 5. Power off the device
53 6. Power on the device
54_verification:
55 1. Verify that the paired device will reconnect automatically,
56 eg. it appears bold in the list
57
58id: bluez/connection/device_disconnect
59category_id: bluez
60_description: Verify that the connected device can be disconnected
61depends: bluez/connection/device_cycle
62plugin: manual
63_steps:
64 1. Pair a device with a computer
65 2. Remove the pairing
66 3. Pair the device a second time
67_verification:
68 1. Verify that the device can connect again
69
70id: bluez/connection/pc_reboot
71category_id: bluez
72_description: Verify that devices will reconnect after reboot
73depends: bluez/connection/device_cycle
74plugin: manual
75_steps:
76 1. Pair a device with the computer
77 2. Reboot the computer
78_verification:
79 1. Verify that the paired device will reconnect after rebooting it
80
81id: bluez/connection/device_discard
82category_id: bluez
83_description: Verify that the paired device can be forgotten
84depends: bluez/connection/device_cycle
85plugin: manual
86_steps:
87 1. Pair a device with the computer
88 2. Remove the pairing
89_verification:
90 1. Verify that the paired device no longer appears in the devices list,
91 eg. it's NOT listed in bold in Unity Control Center
92
93id: bluez/connection/no_connect_discarded
94category_id: bluez
95_description: Verify that a discarded device don't connect
96depends: bluez/connection/device_cycle
97plugin: manual
98_steps:
99 1. Pair a device with the computer
100 2. Remove the pairing
101_verification:
102 1. Verify that the paired device no longer connects
103
104id: bluez/connection/device_readd
105category_id: bluez
106_description: Verify that a discarded device can be paired again
107depends: bluez/connection/device_cycle
108plugin: manual
109_steps:
110 1. Pair a device with the computer
111 2. Remove the pairing
112 4. Pair the device again
113_verification:
114 1. Ensure that the device can connect
115
116id: bluez/discoverable/pc_not_discoverable
117category_id: bluez
118_description: Verify that the PC can disable discovery
119plugin: manual
120_steps:
121 1. Toggle the PC Bluetooth visibility off
122_verification:
123 1. Ensure that the PC can't be discovered from any other device
124
125id: bluez/discoverable/pc_discoverable
126category_id: bluez
127_description: Verify that the PC can enable discovery
128plugin: manual
129_steps:
130 1. Toggle the visibility on
131 2. Do a Bluetooth scan from another device, eg. a smartphone
132_verification:
133 1. Ensure that the PC can be discovered from the other device
134
135id: bluez/setup/ensure_interface_connection_setup_desktop
136category_id: bluez
137_description: Ensure that the bluez interface is connected
138plugin: manual
139_verification:
140 Open a text editor and make sure you can type text from the HID keyboard
141 into the text box. If testing a mouse, ensure that the cursor moves when
142 moving your HID mouse.
diff --git a/com.canonical.se:engineering-tests/units/bluez/general.pxu b/com.canonical.se:engineering-tests/units/bluez/general.pxu
0new file mode 100644143new file mode 100644
index 0000000..18b8b52
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/bluez/general.pxu
@@ -0,0 +1,302 @@
1# Copyright (C) 2017 Canonical, Ltd.
2# All rights reserved.
3#
4# Written by:
5# Jim Hodapp <jim.hodapp@canonical.com>
6# Matteo Croce <matteo.croce@canonical.com>
7
8unit: category
9id: bluez
10_name: BlueZ
11
12id: bluez/setup/enabled_on_boot
13category_id: bluez
14_description: Ensure that Bluetooth is enabled on boot
15plugin: manual
16_steps:
17 1. Power on the Device Under Test
18 2. If Bluetooth isn't enabled on first boot, enable it and reboot
19 3. Use bluetoothctl to check if there is an active adapter
20 .
21 $ bluetoothctl
22_verification:
23 1. Check that there is a Controller in the output, eg.
24 [NEW] Controller 00:10:20:30:40:50 pi [default]
25
26id: bluez/scan/start_inquiry
27category_id: bluez
28_description: Verify that found gadgets are reported during an ongoing device discovery
29plugin: manual
30_steps:
31 1. Turn Bluetooth on on a gadget and make it discoverable
32 2. Use bluetoothctl to start a device scan:
33 .
34 $ bluetoothctl
35 [bluetooth]# scan on
36 [bluetooth]# devices
37 .
38_verification:
39 You should see the gadget listed after the local adapter:
40 Device XX:XX:XX:XX:XX:XX My Device
41 [NEW] Device 04:52:C7:0D:0C:03 QC 35s
42
43id: bluez/scan/stop_inquiry
44category_id: bluez
45_description: Verify that gadgets are not found with scan disabled
46plugin: manual
47_steps:
48 1. Use bluetoothctl to start stop the device scan
49 .
50 $ bluetoothctl
51 [bluetooth]# scan off
52 .
53 2. Turn bluetooth on on a gadget and make it discoverable
54 3. Use bluetoothctl to get the devices list
55 .
56 $ bluetoothctl
57 [bluetooth]# devices
58 .
59_verification:
60 You should only see the local adapter in the list
61 Device XX:XX:XX:XX:XX:XX My Device
62
63id: bluez/pairing/can_be_enabled
64category_id: bluez
65_description: Verify that the device pairing works
66plugin: manual
67_steps:
68 1. Use bluetoothctl to enable pairing
69 .
70 $ bluetoothctl
71 [bluetooth]# pairable on
72 .
73 2. Pair the Device Under Test from a gadget
74_verification:
75 1. You should be able to do the pairing
76
77id: bluez/pairing/can_be_disabled
78category_id: bluez
79_description: Verify that the pairing can be disabled
80plugin: manual
81_steps:
82 1. Use bluetoothctl to disable pairing
83 .
84 $ bluetoothctl
85 [bluetooth]# pairable off
86 .
87 2. Pair the Device Under Test from a gadget
88_verification:
89 1. You shouldn't be able to do the pairing
90
91id: bluez/setup/discoverable_by_default
92category_id: bluez
93_description: Ensure that Device Under Test is discoverable by default
94plugin: manual
95_steps:
96 1. Type:
97 .
98 $ bluetoothctl
99 [bluetooth]# show
100 2. Scan for devices from a smartphone
101_verification:
102 1. Verify that the Device Under Test is discoverable by default, eg.
103 .
104 $ bluetoothctl
105 [bluetooth]# show
106 .
107 contains the "Discoverable: yes" line
108 2. Check that the Device Under Test can be discovered on the smartphone
109
110id: bluez/setup/bt_name_correct
111category_id: bluez
112_description: Ensure that the Bluetooth Device Under Test name is correct
113plugin: manual
114_steps:
115 1. Type:
116 .
117 $ bluetoothctl
118 [bluetooth]# show
119_verification:
120 1. Verify that the Bluetooth Device Under Test name is correct: equals to the Ubuntu Touch
121 device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch,
122 or to the hostname for desktop
123 .
124 Name: Ubuntu
125
126id: bluez/setup/bt_name_correct_from_gadget
127category_id: bluez
128_description: Ensure that the Bluetooth Device Under Test name advertise correctly
129plugin: manual
130_steps:
131 1. Scan for devices from a smartphone
132_verification:
133 1. Verify that the Bluetooth Device Under Test name is correct as seen from an external device
134
135id: bluez/connection/gadget_reconnect_after_power_cycle
136category_id: bluez
137_description: Verify that gadgets will reconnect after power cycle
138plugin: manual
139_steps:
140 1. Connect a gadget with the Device Under Test:
141 .
142 $ bluetoothctl
143 bluetooth]# scan on
144 Discovery started
145 [NEW] Device 01:02:03:04:05:06 device
146 [bluetooth]# pair 01:02:03:04:05:06
147 Pairing successful
148 [bluetooth]# trust 01:02:03:04:05:06
149 Trusted
150 [bluetooth]# connect 01:02:03:04:05:06
151 .
152 2. Power off the gadget
153 3. Power on the gadget
154_verification:
155 1. Verify that the paired gadget will reconnect automatically
156 .
157 $ bluetoothctl
158 bluetooth]# info 01:02:03:04:05:06
159 .
160 and check for "Connected: Yes"
161
162id: bluez/connection/reconnect_after_dut_reboot
163category_id: bluez
164_description: Verify that gadgets will reconnect after reboot
165plugin: manual
166depends: bluez/connection/gadget_reconnect_after_power_cycle
167_steps:
168 1. Pair a gadget with the Device Under Test
169 2. Reboot the Device Under Test
170_verification:
171 1. Verify that the paired gadget will reconnect after reboot
172
173id: bluez/connection/gadget_disconnect
174category_id: bluez
175_description: Verify that the connected gadget can be disconnected
176plugin: manual
177depends: bluez/connection/gadget_reconnect_after_power_cycle
178_steps:
179 1. Connect a gadget with the Device Under Test
180 2. Disconnect it with:
181 .
182 $ bluetoothctl
183 [bluetooth]# disconnect 01:02:03:04:05:06
184 .
185_verification:
186 1. Verify that the gadget is disconnected
187 .
188 $ bluetoothctl
189 bluetooth]# info 01:02:03:04:05:06
190 .
191 and check for "Connected: no"
192
193id: bluez/connection/gadget_can_be_forgotten
194category_id: bluez
195_description: Verify that the paired gadget can be forgotten
196plugin: manual
197depends: bluez/connection/gadget_reconnect_after_power_cycle
198_steps:
199 1. Pair a gadget with the Device Under Test
200 2. Remove the pairing
201 .
202 $ bluetoothctl
203 [bluetooth]# remove 01:02:03:04:05:06
204_verification:
205 1. Verify that the paired gadget no longer appears in the gadgets list
206 .
207 $ bluetoothctl
208 bluetooth]# info 01:02:03:04:05:06
209 .
210 and check for "Paired: no"
211
212id: bluez/connection/gadget_paired_again
213category_id: bluez
214_description: Verify that forgotten gadgets can be paired again
215plugin: manual
216depends: bluez/connection/gadget_can_be_forgotten
217_steps:
218 1. Pair a gadget with the Device Under Test
219 2. Remove the pairing
220 4. Pair the gadget a second time
221_verification:
222 1. Ensure that the gadget be paired again:
223 .
224 $ bluetoothctl
225 bluetooth]# info 01:02:03:04:05:06
226 .
227 and check for "Paired: yes"
228
229id: bluez/discoverable/dut_not_discoverable
230category_id: bluez
231_description: Verify that the Device Under Test can disable discovery
232plugin: manual
233_steps:
234 1. Toggle the Device Under Test Bluetooth visibility off:
235 .
236 $ bluetoothctl
237 bluetooth]# discoverable off
238 .
239_verification:
240 1. Ensure that the Device Under Test can't be discovered from any other gadget
241
242id: bluez/discoverable/dut_discoverable
243category_id: bluez
244_description: Verify that the Device Under Test can enable discovery
245plugin: manual
246_steps:
247 1. Toggle the Device Under Test Bluetooth visibility on
248 .
249 $ bluetoothctl
250 bluetooth]# discoverable on
251 .
252_verification:
253 1. Ensure that the Device Under Test can be discovered from other gadgets
254
255id: bluez/audio/a2dp_ubuntu_classic
256category_id: bluez
257plugin: manual
258depends: bluez/connection/pair_and_connect
259_summary: Stream audio to Bluetooth headset
260_purpose:
261 Verify that you can stream music to a Bluetooth headset via A2DP on Ubuntu
262 Classic. Note: Skip this test if not running Ubuntu Classic
263_steps:
264 1. Follow the previous tests to list, pair and connect your headset
265 Navigate to the Sound panel in System Settings, select your headset device
266 in the Output tab, and make sure that Mode is set to A2DP
267 Then press the Test Sound button and test each speaker
268_verification:
269 Verify that you can hear the test sound "Front left", "Front right" in each
270 speaker respectively.
271
272id: bluez/audio/a2dp_disconnect
273category_id: bluez
274plugin: manual
275depends: bluez/audio/a2dp_ubuntu_classic
276_summary: Disconnect Bluetooth headset
277_purpose:
278 Verify that you can disconnect Bluetooth headset while streaming and audio
279 playback switches back to the Device Under Test's primary speaker
280_steps:
281 1. Follow the previous tests to start streaming audio to the headset via
282 A2DP. Then execute the following command to disconnect the headset from
283 active A2DP streaming:
284 .
285 [<dut_name>]# disconnect <gadget_address>
286_verification:
287 Verify that you see output similar to the following:
288 Attempting to disconnect from 04:52:C7:0D:0C:03
289 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
290 Successful disconnected
291 [CHG] Device 04:52:C7:0D:0C:03 Connected: no
292 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Key: 0x0110
293 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x40
294 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x0c
295 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x02
296 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x41
297 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x00
298 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x61
299 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x71
300 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0xcd
301 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x92
302 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x6c
diff --git a/com.canonical.se:engineering-tests/units/bluez/hid.pxu b/com.canonical.se:engineering-tests/units/bluez/hid.pxu
0new file mode 100644303new file mode 100644
index 0000000..394e361
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/bluez/hid.pxu
@@ -0,0 +1,83 @@
1# Copyright (C) 2017 Canonical, Ltd.
2# All rights reserved.
3#
4# Written by:
5# Matteo Croce <matteo.croce@canonical.com>
6
7id: bluez/hid/pair_and_connect_hid
8category_id: bluez
9plugin: manual
10depends: bluez/setup/ensure_interface_connection_setup
11_summary: A Bluetooth HID gadget (e.g. keyboard, mouse) is connected and paired
12_purpose:
13 Check if your Bluetooth HID gadget of choice (e.g. keyboard, mouse) can be
14 paired to the host system.
15_steps:
16 1. Execute the following command to pair and connect your HID gadget to the
17 host system:
18 .
19 [bluetooth]# scan on
20 [bluetooth]# scan off
21 [bluetooth]# pair 01:02:03:04:05:06
22 [bluetooth]# connect 01:02:03:04:05:06
23 .
24_verification:
25 Open a text editor and make sure you can type text from the HID keyboard
26 into the text box. If testing a mouse, ensure that the cursor moves when
27 moving your HID mouse
28
29id: bluez/hid/bt_mouse_works
30category_id: bluez
31_description: Verify that Bluetooth mice do work
32plugin: manual
33depends: bluez/hid/pair_and_connect_hid
34_steps:
35 1. Scan for a BT mouse and connect it to the DUT
36_verification:
37 1. Verify that the paired mouse can move the pointer
38 2. Verify that the device is automatically connected at boot
39 3. Verify that the device is automatically connected after resume from sleep
40
41id: bluez/hid/bt_keyboard_works
42category_id: bluez
43_description: Verify that Bluetooth keyboards do work
44plugin: manual
45_steps:
46 1. Scan for a BT keyboard and connect it to the DUT, eg.
47 .
48 $ bluetoothctl
49 [bluetooth]# scan on
50 [bluetooth]# scan off
51 [bluetooth]# pair 01:02:03:04:05:06
52 Pairing successful
53 [bluetooth]# trust 01:02:03:04:05:06
54 [bluetooth]# connect 01:02:03:04:05:06
55 Trusted
56_verification:
57 1. Verify that the paired keyboard can write in a text editor
58 2. Verify that the device is automatically connected at boot
59 3. Verify that the device is automatically connected after resume from sleep
60 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly
61
62id: bluez/hid/ble_mouse_works
63category_id: bluez
64_description: Verify that BLE mices do work
65plugin: manual
66_steps:
67 1. Pair a BLE mouse with the DUT.
68_verification:
69 1. Verify that the paired mouse can move the pointer
70 2. Verify that the device is automatically connected at boot
71 3. Verify that the device is automatically connected after resume from sleep
72
73id: bluez/hid/ble_keyboard_works
74category_id: bluez
75_description: Verify that BLE keyboards do work
76plugin: manual
77_steps:
78 1. Pair a BLE keyboard with the DUT.
79_verification:
80 1. Verify that the paired keyboard can write in a text editor
81 2. Verify that the device is automatically connected at boot
82 3. Verify that the device is automatically connected after resume from sleep
83 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly
diff --git a/com.canonical.se:engineering-tests/units/bluez/setup.pxu b/com.canonical.se:engineering-tests/units/bluez/setup.pxu
0new file mode 10064484new file mode 100644
index 0000000..3060426
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/bluez/setup.pxu
@@ -0,0 +1,140 @@
1# Copyright (C) 2017 Canonical, Ltd.
2# All rights reserved.
3#
4# Written by:
5# Matteo Croce <matteo.croce@canonical.com>
6
7id: bluez/setup/ensure_interface_connection_setup
8category_id: bluez
9_description: Ensure that the bluez interface is connected
10plugin: manual
11_steps:
12 1. Connect required bluez slot/plug
13 .
14 $ sudo snap connect bluez:client bluez:service
15 .
16_verification:
17 Verify that you see the following when running snap interfaces bluez:
18 bluez:service bluez:client
19
20id: bluez/snap/ensure_nonroot_cannot_use
21category_id: bluez
22plugin: manual
23depends: bluez/setup/ensure_interface_connection_setup
24_summary: bluetoothctl and obexctl cannot be run as non-root user
25_purpose:
26 Verify that the bluetoothctl and obexctl commands cannot be run as non-root
27_steps:
28 1. Start the bluetoothctl and obexctl commands as non-root user
29 .
30 $ bluetoothctl
31 $ obexctl
32 .
33_verification:
34 You should see outout similar to the following:
35 .
36 $ bluetoothctl
37 This script must be run as root
38 $ obexctl
39 This script must be run as root
40
41id: bluez/scan/get_all
42category_id: bluez
43plugin: manual
44depends: bluez/setup/ensure_interface_connection_setup
45_summary: All Bluetooth gadgets in range are listed
46_purpose:
47 Check if all powered on gadgets that are within range as listed.
48_steps:
49 1. Execute the following command to retrieve the list of all Bluetooth gadgets:
50 .
51 $ /snap/bin/bluez.bluetoothctl
52 [bluetooth]# scan on
53 .
54_verification:
55 Your expected Bluetooth gadget(s) is/are shown in the output list such as:
56 [NEW] Device 04:52:C7:0D:0C:03 QC 35s
57
58id: bluez/connection/pair_and_connect
59category_id: bluez
60plugin: manual
61depends: bluez/setup/ensure_interface_connection_setup
62_summary: A Bluetooth gadget of choice is paired and connected
63_purpose:
64 Check if your Bluetooth gadget of choice can be paired to the host system.
65_steps:
66 1. Execute the following command to pair and connect your gadget to the host
67 system using the address listed in the previous scan test:
68 .
69 [bluetooth]# pair <gadget_address>
70 [bluetooth]# connect <gadget_address>
71 .
72_verification:
73 You should see output similar to the following:
74 Attempting to pair with 04:52:C7:0D:0C:03
75 [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
76 [CHG] Device 04:52:C7:0D:0C:03 Modalias: bluetooth:v009Ep400Cd0106
77 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
78 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
79 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
80 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
81 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
82 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
83 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
84 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
85 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
86 [CHG] Device 04:52:C7:0D:0C:03 Paired: yes
87 Pairing successful
88 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
89 [CHG] Device 04:52:C7:0D:0C:03 Connected: no
90 Attempting to connect to 04:52:C7:0D:0C:03
91 [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
92 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
93 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
94 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
95 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
96 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
97 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
98 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
99 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
100 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
101 Connection successful
102 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
103
104id: bluez/snap/ensure_btmon_can_be started
105category_id: bluez
106plugin: manual
107depends: bluez/setup/ensure_interface_connection_setup
108_summary: btmon tools function
109_purpose:
110 Check that the btmon tool shipped as a part of the bluez snap can be used.
111_steps:
112 1. Start the btmon command
113 .
114 $ sudo btmon
115 .
116_verification:
117 You should see outout similar to the following:
118 .
119 $ sudo btmon
120 Bluetooth monitor ver 5.37
121 = New Index: 00:1A:7D:DA:71:08 (BR/EDR,USB,hci0) [hci0] 0.626494
122
123id: bluez/snap/ensure_hcidump_can_be started
124category_id: bluez
125plugin: manual
126depends: bluez/setup/ensure_interface_connection_setup
127_summary: btmon tools works
128_purpose:
129 Check that the hcidump tool shipped as a part of the bluez snap can be used.
130_steps:
131 1. Start the hcidump command
132 .
133 $ sudo hcidump
134 .
135_verification:
136 You should see outout similar to the following:
137 .
138 $ sudo hcidump
139 HCI sniffer - Bluetooth packet analyzer ver 5.37
140 device: hci0 snap_len: 1500 filter: 0xffffffff
diff --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
0new file mode 100644141new file mode 100644
index 0000000..d45f0e6
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/captive-redirect/captive-redirect.pxu
@@ -0,0 +1,102 @@
1# Copyright (C) 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Matteo Croce <matteo.croce@canonical.com>
6
7unit: category
8id: captive_redirect
9_name: Captive portal redirect
10
11id: captive_redirect/setup/ensure_interface_connection_setup
12category_id: captive_redirect
13_description: Ensure that the captive-redirect interfaces are connected
14plugin: manual
15_steps:
16 1. Install the captive-redirect snap via
17 .
18 $ snap install captive-redirect
19 .
20_verification:
21 Verify that you see the following when running snap interfaces:
22 :firewall-control captive-redirect
23
24id: captive_redirect/setup/default_disabled
25category_id: captive_redirect
26_description: Ensure that captive-redirect is disabled by default
27plugin: manual
28_steps:
29 1. Get the configuration with:
30 .
31 $ captive-redirect.config status
32 .
33 2. Ensure that there isn't any REDIRECT iptables chain:
34 .
35 $ sudo iptables-save |grep captive
36 .
37_verification:
38 1. Check that the redirect is disabled:
39 .
40 active: false
41 .
42 2. You shouldn't see any iptables rule
43
44id: captive_redirect/setup/iptables_rules_all_interfaces
45category_id: captive_redirect
46_description: Ensure that enabling captive-redirect sets up the correct iptables rules
47plugin: manual
48_steps:
49 1. Enable captive-redirect with:
50 .
51 $ sudo snap set captive-redirect active=true port=9876
52 .
53 2. Get the iptables rules with:
54 .
55 $ sudo iptables-save |grep captive
56 .
57_verification:
58 1. You should see iptables rules like:
59 .
60 :captive - [0:0]
61 -A PREROUTING -j captive
62 -A captive -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9876
63 .
64
65id: captive_redirect/setup/iptables_rules_one_interface
66category_id: captive_redirect
67_description: Ensure that enabling captive-redirect sets up iptables rules for a single interface
68plugin: manual
69_steps:
70 1. Enable captive-redirect with:
71 .
72 $ sudo snap set captive-redirect active=true port=9999 interfaces=tun4
73 .
74 2. Get the iptables rules with:
75 .
76 $ sudo iptables-save |grep captive
77 .
78_verification:
79 1. You should see iptables rules like:
80 .
81 :captive - [0:0]
82 -A PREROUTING -j captive
83 -A captive -i tun4 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9999
84 .
85
86id: captive_redirect/functionality/redirect_works
87category_id: captive_redirect
88_description: Ensure that enabling captive-redirect really redirects the traffic
89plugin: manual
90_steps:
91 1. Install a sample web server with:
92 .
93 $ sudo snap install xkcd-webserver
94 .
95 2. Connect another device to the DUT (Device Under Test) and setup the DUT as default gateway
96 3. Enable the redirect with:
97 .
98 $ sudo snap set captive-redirect active=true port=80 interfaces=
99 .
100 4. Try to access an HTTP (avoid HTTPS, it will give a certificate error) web page from the device
101_verification:
102 1. You should see a blank page pointing to XKCD instead of the typed address
diff --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
0new file mode 100644103new file mode 100644
index 0000000..c6f8336
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/easy-openvpn/easy-openvpn.pxu
@@ -0,0 +1,163 @@
1# Copyright 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Gary Wang <gary.wang@canonical.com>
6
7unit: category
8id: easy_openvpn
9_name: An easy-to-manage OpenVPN deployment.
10
11id: easy_openvpn/setup/ensure_interface_connection
12category_id: easy_openvpn
13_description: Ensure the easy-openvpn interfaces are connected
14plugin: manual
15_steps:
16 1. If the easy-openvpn snap is already installed remove it via
17 .
18 $ snap remove easy-openvpn
19 .
20 2. Install easy-openvpn from the store.
21 .
22 $ snap install easy-openvpn
23 .
24_verification:
25 Verify that you see the following when running snap interfaces:
26 :network easy-openvpn
27 :network-bind easy-openvpn
28 :network-control easy-openvpn
29 :firewall-control easy-openvpn
30
31id: easy_openvpn/setup/launch_server
32category_id: easy_openvpn
33plugin: manual
34depends: easy_openvpn/setup/ensure_interface_connection
35_summary: Setup and launch an openvpn Server
36_purpose:
37 Check if an openvpn server is up and running after it's configured.
38_steps:
39 1. Enable IP forwarding firstly.
40 Note: On ubuntu core, IP forwarding is disabled by default.
41 .
42 $ sudo sysctl -w net.ipv4.ip_forward=1
43 .
44 2. Set correct nat device according to your server connection.
45 Typically, the nat device is 'eth0' (default value) if
46 the connection is over an ethernet connection. You need to set
47 it to 'wlan0' if a wireless connection is established.
48 Note: This fits the scenario where people usually setup a
49 wireless connection on ubuntu core at the first boot.
50 .
51 $ sudo snap set easy-openvpn natdevice=wlan0
52 .
53 3. Find IP address if host machine via ifconfig or hostname:
54 .
55 $ hostname -I | cut -f1 -d' '
56 .
57 4. Configure the server with host machine IP address:
58 Note: PEM pass phrase is mandatory.
59 .
60 $ sudo easy-openvpn.setup -u "udp://SERVER_IP"
61 .
62 5. Launch the openvpn server:
63 .
64 sudo service snap.easy-openvpn.easy-openvpn start
65 .
66_verification:
67 Run the following command to check journal logs of easy-openvpn:
68 .
69 $ sudo journalctl -n 10 --no-pager -u snap.easy-openvpn.easy-openvpn
70 .
71 Verify if logs contain the following information like:
72 'Initialization Sequence Completed'
73
74id: easy_openvpn/setup/add_client
75category_id: easy_openvpn
76plugin: manual
77depends: easy_openvpn/setup/launch_server
78_summary: Adding an openvpn client.
79_purpose:
80 Check if a newly added client can be found at the client list of server.
81_steps:
82 1. Add an openvpn client named 'foo' and output corresponding
83 client config file(foo.ovpn).
84 .
85 $ sudo easy-openvpn.add-client foo > foo.ovpn
86 .
87_verification:
88 Verify if the newly added client(foo) can be found at client list
89 Run the following command to view the client list of the openvpn server.
90 .
91 $ sudo easy-openvpn.clients
92 .
93
94id: easy_openvpn/setup/connect_server
95category_id: easy_openvpn
96plugin: manual
97depends: easy_openvpn/setup/launch_server
98_summary: Connecting an openvpn server.
99_purpose:
100 Check if an end user can connect to an openvpn server from another host machine.
101_steps:
102 1. Install this snap on another machine acting as an openvpn client.
103 Copy the generated foo.ovpn from server to read/write location on this client.
104 Remember to change the owner of foo.ovpn to 'root' to overcome
105 dac_override denied in snappy world.
106 .
107 $ sudo chown root.root foo.ovpn
108 .
109 2. Open a terminal and connect the server by running:
110 .
111 $ sudo easy-openvpn.connect-server foo.ovpn
112 .
113_verification:
114 Verify if the client logging output contains the following information.
115 ' openvpn.* Initialization Sequence Completed'
116
117id: easy_openvpn/setup/monitor_status
118category_id: easy_openvpn
119plugin: manual
120depends: easy_openvpn/setup/connect_server
121_summary: Monitor client's status.
122_purpose:
123 Monitor clients connection status i.e. traffic information and router table.
124_steps:
125 1. On client side
126 After vpn connection is established, open a web browser
127 and navigate to any website.
128 2. On server side, run the following command:
129 .
130 $ sudo easy-openvpn.status
131 .
132_verification:
133 Verify if there's internet connection after connection is established.
134 Observing network traffic, especially for bytes received, bytes sent
135 from the logging output and Ensure the values are not zero.
136
137id: easy_openvpn/setup/revoke_client
138category_id: easy_openvpn
139plugin: manual
140depends: easy_openvpn/setup/monitor_status
141_summary: Revoking an openvpn client.
142_purpose:
143 Check if a client can connect to server after the certificate is revoked.
144_steps:
145 On the server side:
146 1. Remove a known client on the server i.e. 'foo'
147 .
148 $ sudo easy-openvpn.revoke-client foo
149 .
150 2. Check if the client is marked as 'REVOKED'
151 .
152 $ sudo easy-openvpn.clients | MATCH "foo.*REVOKED"
153 .
154 On the client side:
155 1. Kill the openvpn client if it's running.
156 2. Connect to server again.
157 .
158 $ sudo easy-openvpn.connect-server foo.ovpn
159 .
160_verification:
161 Verify if VPN connection fails after the client is revoked on the server end
162 and the client logging output contains the following information
163 "TLS Error: TLS handshake failed"
diff --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
0new file mode 100644164new file mode 100644
index 0000000..24ad2bc
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/media-hub/media-hub-snap.pxu
@@ -0,0 +1,73 @@
1# Copyright (C) 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
6
7id: media_hub/snap_classic/play_wav
8category_id: media_hub
9plugin: manual
10_summary: Confined media-hub can play wav files
11_purpose:
12 Check if media-hub properly plays wav files when confined. The scenario is
13 Unity8 on Classic.
14_steps:
15 1. Install snaps and perform needed interface connections
16 .
17 $ snap install media-hub
18 $ snap install --devmode mediaplayer-app
19 $ sudo snap connect mediaplayer-app:mpris media-hub:mpris
20 .
21 2. Start media-hub-server (needed until LP #1613420 is solved)
22 .
23 $ media-hub.media-hub-service
24 .
25 3. Download sample file
26 .
27 $ wget -P ~/Music/ http://freewavesamples.com/files/Kawai-K5000W-Buchla-C1.wav
28 .
29 4. Launch mediaplayer-app
30 .
31 $ /snap/bin/mediaplayer-app ~/Music/Kawai-K5000W-Buchla-C1.wav
32 .
33 5. Let the song play until the end
34 6. Restart playback after the song finishes
35 7. Pause, then press play again a few times
36 8. While the song is playing, move the slider back and forth in time
37 9. Pause the song, then move the slider again
38_verification:
39 Verify that in all cases the audio is played as expected.
40
41id: media_hub/snap_classic/play_mp3
42category_id: media_hub
43plugin: manual
44_summary: Confined media-hub can play an mp3
45_purpose:
46 Check if media-hub properly plays an mp3 when confined. The scenario is Unity8
47 on Classic.
48_steps:
49 1. Install snaps and perform needed interface connections
50 .
51 $ snap install media-hub
52 $ snap install --devmode mediaplayer-app
53 $ sudo snap connect mediaplayer-app:mpris media-hub:mpris
54 .
55 2. Start media-hub-server (needed until LP #1613420 is solved)
56 .
57 $ media-hub.media-hub-service
58 .
59 3. Download sample file
60 .
61 $ wget -P ~/Music/ http://www.stephaniequinn.com/Music/Canon.mp3
62 .
63 4. Launch mediaplayer-app
64 .
65 $ /snap/bin/mediaplayer-app ~/Music/Canon.mp3
66 .
67 5. Let the song play until the end
68 6. Restart playback after the song finishes
69 7. Pause, then press play again a few times
70 8. While the song is playing, move the slider back and forth in time
71 9. Pause the song, then move the slider again
72_verification:
73 Verify that in all cases the audio is played as expected.
diff --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
0new file mode 10064474new file mode 100644
index 0000000..bdeec69
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/media-hub/media-hub.pxu
@@ -0,0 +1,65 @@
1# Copyright 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
6
7unit: category
8id: media_hub
9_name: media-hub
10
11id: media_hub/video/play_h264
12category_id: media_hub
13plugin: manual
14_summary: H.264 videos play as expected
15_purpose:
16 Check if media-hub plays properly H.264 videos
17_steps:
18 1. Download H.264 video
19 .
20 $ wget https://download.blender.org/durian/trailer/sintel_trailer-720p.mp4
21 .
22 2. Start media-hub-server
23 .
24 $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
25 .
26 3. Start to play the video
27 .
28 $ 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
29 .
30 4. Let the video play until the end
31 5. Re-start after the video finishes
32 6. Pause, then press play again a few times
33 7. While the video is playing, move the slider back and forth in time
34 8. Pause the video, then move the slider again
35 9. Re-size, maximize, then minimize the window several times
36_verification:
37 Verify that in all cases the video is played as expected.
38
39id: media_hub/video/play_mpeg4
40category_id: media_hub
41plugin: manual
42_summary: MPEG4 videos play as expected
43_purpose:
44 Check if media-hub plays properly MPEG4 videos
45_steps:
46 1. Download H.264 video
47 .
48 $ wget https://download.blender.org/durian/trailer/Sintel_Trailer.480p.DivX_Home_Theater.divx
49 .
50 2. Start media-hub-server
51 .
52 $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
53 .
54 3. Start to play the video
55 .
56 $ 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
57 .
58 4. Let the video play until the end
59 5. Re-start after the video finishes
60 6. Pause, then press play again a few times
61 7. While the video is playing, move the slider back and forth in time
62 8. Pause the video, then move the slider again
63 9. Re-size, maximize, then minimize the window several times
64_verification:
65 Verify that in all cases the video is played as expected.
diff --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
0new file mode 10064466new file mode 100644
index 0000000..3912ac2
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/modem-manager/modem-manager.pxu
@@ -0,0 +1,103 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Jim Hodapp <jim.hodapp@canonical.com>
6# Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
7
8unit: category
9id: modem_manager
10_name: Modem Manager
11
12id: modem_manager/setup/ensure_interface_connection_setup
13category_id: modem_manager
14_description: Ensure that the modem-manager interface is connected
15plugin: manual
16_steps:
17 1. Install network-manager if not already installed
18 .
19 $ sudo snap install network-manager
20 .
21 2. Connect required modem-manager/network-manager slots/plugs
22 .
23 $ sudo snap connect modem-manager:mmcli modem-manager:service
24 $ sudo snap connect network-manager:nmcli network-manager:service
25 $ sudo snap connect network-manager:modem-manager modem-manager:service
26 $ sudo snap connect network-manager:ppp ubuntu-core:ppp
27 .
28_verification:
29 Verify that you see the following when running snap interfaces:
30 modem-manager:service modem-manager:mmcli,network-manager:modem-manager
31 network-manager:service network-manager:nmcli
32 :ppp network-manager
33
34id: modem_manager/modems/get_all
35category_id: modem_manager
36plugin: manual
37depends: modem_manager/setup/ensure_interface_connection_setup
38_summary: All active modem configuration items are listed
39_purpose:
40 Check if the modem shows up as being recognized by modem-manager.
41_steps:
42 1. Execute the following command to retrieve the list of all detected modems:
43 .
44 $ sudo mmcli -L
45_verification:
46 Your expected modem is shown in the output list.
47
48id: modem_manager/modems/get_info
49category_id: modem_manager
50plugin: manual
51depends: modem_manager/setup/ensure_interface_connection_setup
52_summary: All modem information listed
53_purpose:
54 Check if the modem details can be listed.
55_steps:
56 1. Execute the following command to retrieve the list of all detected modems.
57 Note, the modem number is listed from the previous test:
58 .
59 $ sudo mmcli -m <modem_number>
60_verification:
61 Your desired modem detail is listed.
62
63id: modem_manager/modems/connect
64category_id: modem_manager
65plugin: manual
66depends: modem_manager/setup/ensure_interface_connection_setup
67_summary: Connect to a listed modem
68_purpose:
69 Connect to a listed modem and verify connection status
70_steps:
71 1. Execute the following commands to connect to a particular modem. First run
72 "sudo nmcli d" to find out what you need to put in <interface> (look for
73 TYPE=gsm, the interface will be the name in the DEVICE column). It will
74 probably be something that starts with "tty" or "cdc". Also, replace
75 <op_apn> by looking up the APN string for your cell provider at
76 http://www.apn-settings.com (e.g. "fast.t-mobile.com" for T-Mobile 4G).
77 Finally, "gsmconn" is an arbitrary connection name and can be set to
78 anything that makes sense for the connection type.
79 .
80 $ sudo nmcli c add type gsm ifname <interface> con-name gsmconn apn <op_apn>
81 $ sudo nmcli r wwan on
82 .
83 2. Check that the connection is up with "sudo nmcli d". It should show that
84 state is "connected". This can take some time depending on network
85 conditions and on the modem type.
86 .
87 3. Check which is the network interface for the cellular connection. For this,
88 fist run
89 .
90 $ sudo nmcli d show <interface>
91 .
92 (here <interface> is the one from point 1), check the IP4.ADDRESS field,
93 then run
94 .
95 $ ip address
96 .
97 and there you can find the network interface that owns that address.
98 .
99 4. Add a route to 8.8.8.8 with
100 .
101 $ sudo ip route add 8.8.8.8 dev <network-interface>
102_verification:
103 Verify that you have a modem connection by pinging 8.8.8.8.
diff --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
0new file mode 100644104new file mode 100644
index 0000000..e905919
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/network-manager/network-manager.pxu
@@ -0,0 +1,379 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Lorn Potter <lorn.potter@canonical.com>
6# Simon Fels <simon.fels@canonical.com>
7
8unit: category
9id: network_manager
10_name: Network Manager
11
12id: network_manager/misc/check_for_crashes
13category_id: network_manager
14plugin: manual
15_summary: Verify that NetworkManager hasn't crashed in previous runs.
16_steps:
17 1. Power on a Desktop system, this tests does not apply elsewhere.
18 2. List content of /var/crash for crash dumps:
19 .
20 ls -l /var/crash
21 .
22_verification:
23 1. Check that /var/crash is empty.
24
25id: network_manager/ethernet/enable_support
26category_id: network_manager
27plugin: manual
28_summary: Ethernet support for NetworkManager needs to be manually enabled
29_purpose:
30 By default ethernet support is disabled in the network-manager snap. In order
31 to be able to get it managed through NetworkManager a few manual steps need to
32 be performed.
33_steps:
34 1. Create /etc/netplan/00-default-nm-renderer.yaml with the following content:
35 .
36 network:
37 renderer: NetworkManager
38 .
39 2. Drop any other files from /etc/netplan and reboot the device.
40_verification:
41 NOTE: The device may get another IP address assigned as before. Use a network
42 scanner or a monitor+keyboard to check which IP address it got assigned.
43 .
44 Once the device is rebooted you should be able to connect to it by using the
45 network connection offered on the ethernet port. When logged into the device
46 verify NetworkManager automatically connected the ethernet port:
47 .
48 $ network-manager.nmcli d
49 DEVICE TYPE STATE CONNECTION
50 eth0 ethernet connected eth0
51 [...]
52 .
53 The state of all ethernet devices with a plugged cable and a working network
54 behind should be 'connected'.
55
56id: network_manager/ethernet/all_ports_detected
57depends: network_manager/ethernet/enable_support
58category_id: network_manager
59plugin: manual
60_summary: NetworkManager should detect all available ethernet ports
61_purpose:
62 NetworkManager should detect all available ethernet ports by default
63 on a system and list them as usable devices.
64_steps:
65 1. List all available ethernet ports
66 $ ifconfig -a | grep -E '$eth'
67 $ ifconfig -a | grep -E '$en'
68 2. List all ethernet ports NetworkManager knows about
69 $ network-manager.nmcli d
70_verification:
71 Both steps should show the same list of ethernet network interfaces.
72
73id: network_manager/ethernet/auto_connected
74depends: network_manager/ethernet/enable_support
75category_id: network_manager
76plugin: manual
77_summary: NetworkManager should auto-connect any ethernet port with a link
78_purpose:
79 When a cable is plugged into an ethernet port NetworkManager should try
80 to automatically connect the port.
81 .
82 NOTE: This test assumes that the cable you plug into the port is connected
83 to a network which offers a DHCP server.
84_steps:
85 1. Ensure that there is no connection for the port you want to use for
86 testing. Using a serial console to perform this test is recommended.
87 2. Drop any existing connections listed by
88 $ network-manager.nmcli c show
89 which are meant for the ethernet port of the device with
90 $ network-manager.nmcli c delete <UUID>
91 3. Plug the cable into the ethernet port.
92_verification:
93 The ethernet port should be automatically connected by NetworkManager. This
94 can be verified with
95 $ network-manager.nmcli d | grep <ethernet device name>
96 eth0 ethernet connected <connection name>
97 Please note that the <connection name> can be different as its
98 automatically selected by NetworkManager. It can be "Wired Connection 1"
99 for example.
100
101id: network_manager/ethernet/auto_connect_existing_connection
102depends: network_manager/ethernet/enable_support
103category_id: network_manager
104plugin: manual
105_summary: Cable plug/unplug should give an existing connection
106_purpose:
107 When a cable is unplugged and plugged again the ethernet port should
108 be automatically reconnected.
109_steps:
110 1. Check if the ethernet port is currently connected
111 $ network-manager.nmcli d
112 2. Unplug the cable from the ethernet port and check the connection
113 $ network-manager.nmcli d
114 3. Plug the cable again and check the connection status.
115_verification:
116 Before the cable is unplugged the ethernet port should be marked
117 as connected. Once the cable is removed the connection status
118 should switch to unconnected. When plugged back in, it should be marked
119 again as connected.
120
121id: network_manager/ethernet/unmanaged
122category_id: network_manager
123plugin: manual
124depends: network_manager/ethernet/auto_connected
125_summary: Check if ethernet device is unmanaged.
126_purpose:
127 Check if the ethernet device is not managed by Network Manager.
128 .
129 NOTE: This only applies to devices where ethernet is not managed by
130 NetworkManager. Check if /etc/netplan/00-default-nm-renderer.yaml
131 exists. If it does not, then NetworkManager doesn't touch any
132 ethernet connection. If it exists, skip this test.
133_steps:
134 1. Execute the following command to retrieve the list of all detected connections.
135 Note, the AP number is listed from the previous test:
136 .
137 $ /snap/bin/network-manager.nmcli d | grep en
138_verification:
139 The network device is listed as 'unmanaged', as an example:
140 enxb827ebf6b919 ethernet unmanaged --
141
142id: network_manager/connections/get_all
143category_id: network_manager
144plugin: manual
145depends: network_manager/ethernet/auto_connected
146_summary: All active AP configuration items are listed
147_purpose:
148 Check if the AP shows up as being recognized by Network Manager.
149_steps:
150 1. Execute the following command to retrieve the list of all detected connections:
151 .
152 $ /snap/bin/network-manager.nmcli d wifi list
153_verification:
154 Your expected AP is shown in the output list for example:
155 pool1 Infra 6 54 Mbit/s 75 *** WPA2
156
157id: network_manager/connections/agent
158category_id: network_manager
159plugin: manual
160depends: network_manager/ethernet/auto_connected
161_summary: Register for secret agent
162_purpose:
163 Register for Network Manager's secret agent and verify status
164_steps:
165 1. Execute the following command to register secret agent:
166 .
167 $ /snap/bin/network-manager.nmcli a
168_verification:
169 Output should be similiar to this:
170 nmcli successfully registered as a Network Manager's secret agent.
171 nmcli successfully registered as a polkit agent.
172
173id: network_manager/connections/connect
174category_id: network_manager
175plugin: manual
176depends: network_manager/ethernet/auto_connected
177_summary: Connect to a listed AP
178_purpose:
179 Connect to a listed AP and verify connection status
180_steps:
181 1. Execute the following commands to connect to a particular AP.
182 .
183 $ /snap/bin/network-manager.nmcli dev wifi con "yourssid" password "yourpassword"
184 Note, replace yourssid with the ssid if the AP you will connect to, and replace yourpassword
185 with the actual password/passphrase.
186_verification:
187 Verify that you have a AP connection by issuing this command:
188 $ ifconfig | grep -A 2 wl
189 .
190 verifying that the interface has an IP address with output similiar to this:
191 wlp5s0 Link encap:Ethernet HWaddr 70:77:81:33:92:6b
192 inet addr:10.0.0.108 Bcast:10.0.0.255 Mask:255.255.255.0
193 inet6 addr: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64 Scope:Global
194
195id: network_manager/connections/get_info
196category_id: network_manager
197plugin: manual
198depends: network_manager/ethernet/auto_connected
199_summary: All AP information listed
200_purpose:
201 Check if the AP details can be listed.
202_steps:
203 1. Execute the following command to retrieve the list of all detected connections.
204 Note, the AP ssid is listed from the previous test:
205 .
206 $ /snap/bin/network-manager.nmcli -p -f general,ip4,ip6 c show <AP_SSID>
207_verification:
208 Your desired AP detail is listed and has ip4/ip6 address.
209 ===============================================================================
210 Activate connection details (1554e3b2-76e6-4adc-b986-215b7393f8d9)
211 ===============================================================================
212 GENERAL.NAME: pool1
213 GENERAL.UUID: 1554e3b2-76e6-4adc-b986-215b7393f8d9
214 GENERAL.DEVICES: wlp5s0
215 GENERAL.STATE: activated
216 GENERAL.DEFAULT: no
217 GENERAL.DEFAULT6: no
218 GENERAL.VPN: no
219 GENERAL.ZONE: --
220 GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
221 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/3
222 GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/0
223 GENERAL.MASTER-PATH: --
224 -------------------------------------------------------------------------------
225 IP4.ADDRESS[1]: 10.0.0.108/24
226 IP4.GATEWAY: 10.0.0.138
227 IP4.DNS[1]: 10.0.0.138
228 IP4.DOMAIN[1]: gateway
229 -------------------------------------------------------------------------------
230 IP6.ADDRESS[1]: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64
231 IP6.ADDRESS[2]: 2001:8003:6501:2000:7277:81ff:fe33:926b/64
232 IP6.ADDRESS[3]: fe80::7277:81ff:fe33:926b/64
233 IP6.GATEWAY: fe80::e2b9:e5ff:fe5a:91b0
234 IP6.DNS[1]: 2001:8003:6501:2000::1
235 IP6.DOMAIN[1]: gateway
236 -------------------------------------------------------------------------------
237
238id: network_manager/ethernet/device_supports_wol
239depends: network_manager/ethernet/enable_support
240category_id: network_manager
241plugin: manual
242_summary: Verify that the device under test has support for Wake-on-LAN
243_purpose:
244 Verify that the device you're running the tests on supports Wake-on-LAN. For
245 example, devices like the Raspberry PI (1-3) do not support Wake-on-LAN.
246_steps:
247 Verify that your device supports Wake-on-LAN. You can look into the specs
248 for your device, ask the vendor or search through the internet.
249 .
250 For example the Raspberry PI can't suspend to RAM which is discussed and
251 outlined in https://github.com/raspberrypi/linux/issues/1281 which also
252 makes Wake-on-LAN impossible.
253_verification:
254 If device does not support Wake-on-LAN please SKIP this test case and all
255 depending test cases will be skipped too. If Wake-on-LAN is supported mark
256 test as PASSED.
257
258id: network_manager/ethernet/uses_global_wol
259depends: network_manager/ethernet/device_supports_wol
260category_id: network_manager
261plugin: manual
262_summary: Ethernet connections are using global wake-on-lan setting
263_purpose:
264 Check if an ethernet connection created by NetworkManager automatically uses the
265 global default for wake-on-lan.
266 .
267 NOTE: This requires a system which is configured to not use netplan to
268 generate connections for NetworkManager. On such a system an ethernet
269 connection will always have wake-on-lan disabled as netplan does this
270 by default if not explicitly stated in the netplan configuration.
271_steps:
272 1. Find connection UUID for the ethernet port
273 $ network-manager.nmcli c show | grep eth0
274 2. Verify the connection uses the global wake-on-lan setting
275 $ network-manager.nmcli -m multiline -f 802-3-ethernet.wake-on-lan c show <UUID>
276_verification:
277 The output should look like this:
278 .
279 802-3-ethernet.wake-on-lan: 1 (default)
280
281id: network_manager/ethernet/has_wol_enabled_by_default
282depends: network_manager/ethernet/device_supports_wol
283category_id: network_manager
284plugin: manual
285_summary: Ethernet port has wake-on-lan enabled by default
286_purpose:
287 Check if the actual ethernet device has wake-on-lan correctly enabled when
288 its connection is maintained by NetworkManager.
289_steps:
290 1. Install the se-test-tools snap
291 $ snap install --devmode --edge se-test-tools
292 2. Check the ethernet port for the wake-on-lan setting (eth0 in this case)
293 $ sudo se-test-tools.ethtool eth0
294_verification:
295 The output should be similar to this:
296 Settings for eth0:
297 [...]
298 Supports Wake-on: pumbg
299 Wake-on: g
300 [...]
301 .
302 The relevant line is the "Wake-on:" one. It should have the value "g"
303 set which marks the port as waking up on the magic packet.
304
305id: network_manager/ethernet/wakes_up_with_wol
306depends: network_manager/ethernet/device_supports_wol
307category_id: network_manager
308plugin: manual
309_summary: Wake on LAN configured by NetworkManager can wake up the device
310_purpose:
311 Check that another system can wake up from S5 the SUT using the connected ethernet port.
312_steps:
313 1. Ensure there is an ethernet cable attached to one of the ports and it's configured via
314 NetworkManager. Check with
315 $ network-manager.nmcli d | grep eth0
316 2. Note the MAC address of the the eth0 port
317 $ ifconfig eth0
318 3. Power off the system by running
319 $ sudo poweroff
320 4. From another computer on the same network run the following command:
321 $ wakeonlan {mac}
322 If wakeonlan tool is not installed run:
323 $ sudo apt install wakeonlan
324_verification:
325 Did the SUT wake up from S5?
326
327id: network_manager/debug/default_off
328category_id: network_manager
329plugin: manual
330_summary: The debug option defaults to off
331_purpose:
332 Makes sure that the debug option defaults to disabled
333_steps:
334 1. Install the network-manager snap fresh (i.e. not an upgrade)
335 2. Run the following:
336 .
337 $ sudo snap get network-manager debug.enable
338_verification:
339 Verify that the returned value is "false"
340
341id: network_manager/debug/disabling_works
342category_id: network_manager
343plugin: manual
344depends: network_manager/debug/default_off
345_summary: Disabling debug actually disables debug logging
346_purpose:
347 Makes sure that when debug.enabled is set to "false" no debug logs are written
348_steps:
349 1. Make sure that debug is disabled. Run:
350 .
351 $ sudo snap set network-manager debug.enable=false
352 .
353 2. Show only most recent journal entries
354 .
355 $ sudo journalctl -f -u snap.network-manager.networkmanager.service
356 .
357_verification:
358 Verify that any new log entry in journal coming from network-manager is in <info>,
359 <warn> or <error>, but never in <debug> level
360
361id: network_manager/automount/debug_works
362category_id: network_manager
363plugin: manual
364depends: network_manager/debug/default_off
365_summary: When debug is enabled, debug logs are available
366_purpose:
367 Makes sure that when debug option is enabled the <debug> logs are available
368_steps:
369 1. Make sure that debug is enabled. Run:
370 .
371 $ sudo snap set network-manager debug.enable=true
372 .
373 2. Show only most recent journal entries
374 .
375 $ sudo journalctl -f -u snap.network-manager.networkmanager.service
376 .
377_verification:
378 Verify that any new log entry in journal coming from network-manager is in <debug>
379 level
diff --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
0new file mode 100644380new file mode 100644
index 0000000..8ae9b78
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/network-manager/power_management.pxu
@@ -0,0 +1,31 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Simon Fels <simon.fels@canonical.com>
6
7id: network_manager/power_management/connections_come_back_after_resume
8category_id: network_manager
9plugin: manual
10_summary: Connections managed by NetworkManager should come back when device wakes up
11_purpose:
12 When a device goes to sleep NetworkManager disconnects all connections but
13 will reconnect them back when the device reawakens.
14_steps:
15 1. Verify the device is connectd to a WiFi or ethernet network. You can use
16 .
17 $ network-manager.nmcli d
18 .
19 to check if a wireless network interface is connected or not.
20 2. Suspend the device by calling
21 .
22 $ systemctl suspend
23 .
24 3. Wake up the device again by pressing its power button
25_verification:
26 When the device comes back from suspend after pressing the power button
27 verify with
28 .
29 $ network-manager.nmcli d
30 .
31 that the previously connected WiFi/ethernet network is again connected.
diff --git a/com.canonical.se:engineering-tests/units/network-manager/snap.pxu b/com.canonical.se:engineering-tests/units/network-manager/snap.pxu
0new file mode 10064432new file mode 100644
index 0000000..419901a
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/network-manager/snap.pxu
@@ -0,0 +1,101 @@
1# Copyright 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Matteo Croce <matteo.croce@canonical.com>
6
7id: network_manager/snap/check_interfaces
8category_id: network_manager
9plugin: manual
10_summary: Verify that snap interfaces are correctly connected
11_steps:
12 1. Install the snap from the store:
13 .
14 $ snap install network-manager
15 .
16_verification:
17 1. Verify that the 'network-manager' snap has all required plug connected:
18 .
19 $ snap interfaces |grep network-manager
20 :network-setup-observe network-manager
21 :ppp network-manager
22 modem-manager:service modem-manager:mmcli,network-manager:modem-manager
23 network-manager:service network-manager:nmcli
24 .
25
26id: network_manager/wifi/periodic_scanning
27category_id: network_manager
28depends: network_manager/snap/check_interfaces
29plugin: manual
30_summary: Verify that periodic Wi-Fi scanning occurs
31_steps:
32 1. Run wpa_cli to ensure that periodic scanning is occurring:
33 .
34 $ sudo wpa_cli
35 wpa_cli v2.4
36 .
37 Selected interface 'wlp3s0'
38 .
39 Interactive mode
40 .
41 .
42 2. Get the scan results with:
43 .
44 > scan_results
45 .
46_verification:
47 1. You should see some output like this at least once every 120 seconds
48 in the wpa_cli output
49 .
50 <3>CTRL-EVENT-SCAN-STARTED
51 <3>CTRL-EVENT-SCAN-RESULTS
52 .
53 2. You should see the list of reachable Access Points, eg.
54 .
55 bssid / frequency / signal level / flags / ssid
56 12:34:56:78:89:ab 2437 -85 [WPA2-PSK-CCMP+TKIP][ESS] Home-AP
57
58
59id: network_manager/wifi/no_dbus_duplicate_signals
60category_id: network_manager
61depends: network_manager/snap/check_interfaces
62plugin: manual
63_summary: Ensure that dbus signals aren't duplicated
64_steps:
65 1. Run dbus-monitor:
66 .
67 dbus-monitor --system --profile type=signal,interface=org.freedesktop.DBus.Properties
68 .
69_verification:
70 1. Ensure that when scanning occurs, there aren't duplicate PropertiesChanged
71 signals sent for each AccessPoint object path.
72 There should be a single DBus PropertiesChanged signal for each /AccessPoint/X):
73 .
74 sig 1489573828 1805 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/0 org.freedesktop.DBus.Properties PropertiesChanged
75 sig 1489573828 1806 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/1 org.freedesktop.DBus.Properties PropertiesChanged
76 sig 1489573828 1807 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/2 org.freedesktop.DBus.Properties PropertiesChanged
77 sig 1489573828 1808 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/3 org.freedesktop.DBus.Properties PropertiesChanged
78 sig 1489573828 1809 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/4 org.freedesktop.DBus.Properties PropertiesChanged
79
80
81id: network_manager/wifi/ap_expires
82category_id: network_manager
83depends: network_manager/snap/check_interfaces
84plugin: manual
85_summary: Ensure that AccessPoint entries are volatile
86_steps:
87 1. Bring up an AP (eg. from a smartphone)
88 2. Start wpa_cli and do a wireless scan:
89 .
90 $ wpa_cli
91 > scan
92 .
93 wait 10 seconds, and get the scan results.
94 .
95 > scan_results
96 .
97 3. Shutdown the AP on the smartphone
98 4. Wait 120 seconds
99 5. Retry the wireless scan
100_verification:
101 1. In the second scan the smartphone AP should not be present
diff --git a/com.canonical.se:engineering-tests/units/network-manager/wireless.pxu b/com.canonical.se:engineering-tests/units/network-manager/wireless.pxu
0new file mode 100644102new file mode 100644
index 0000000..52a84d2
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/network-manager/wireless.pxu
@@ -0,0 +1,54 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Simon Fels <simon.fels@canonical.com>
6
7id: network_manager/wireless/powersave_off_by_default
8category_id: network_manager
9plugin: manual
10_summary: NetworkManager should disable powersave by default
11_purpose:
12 The powersave configuration option should cause the mode on the
13 actual hardware device to be turned off by default.
14_steps:
15 Install wireless-tools snap and check that powersave is turned off
16 on the actual hardware wireless device.
17 $ snap install wireless-tools
18_verification:
19 The iw utility should return the following for the selected wireless device
20 $ sudo wireless-tools.iw dev wlan0 get power_save
21 Power save: off
22
23id: network_manager/wireless/powersave_config_default_off
24category_id: network_manager
25plugin: manual
26_summary:
27 The configuration option should be set to disable by default
28_purpose:
29 On installation the snap sets the option to a default value
30 which should always be the same.
31_steps:
32 Retrieve the configuration value via
33 $ snap get network-manager wifi.powersave
34_verification:
35 The returned value should be "disable".
36
37id: network_manager/wireless/powersave_can_be_enabled
38category_id: network_manager
39plugin: manual
40_summary:
41 Enabling powersave with the configuration option of the snap should turn it on.
42_purpose:
43 The network-manager snap uses a configure hook to control how
44 the WiFi powersave option is set. It should be possible to enable
45 the option on the actual hardware wireless device with it.
46_steps:
47 1. Enable powersave via the configure hook
48 $ snap set network-manager wifi.powersave=enable
49_verification:
50 Powersave should now be turned on for all wireless devices. This
51 can be verified with
52 $ snap install wireless-tools
53 $ sudo wireless-tools.iw dev wlan0 get power_save
54 Power save: on
diff --git a/com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu b/com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu
0new file mode 10064455new file mode 100644
index 0000000..43af155
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/pulseaudio/pulseaudio.pxu
@@ -0,0 +1,106 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
6
7unit: category
8id: pulseaudio
9_name: PulseAudio
10
11id: pulseaudio/setup/ensure_interface_connection_setup
12category_id: pulseaudio
13_description: Ensure that the pulseaudio interface is auto-connected
14plugin: manual
15_steps:
16 1. List the interfaces
17 .
18 $ snap interfaces
19 .
20_verification:
21 Verify that you see the following:
22 pulseaudio:service pulseaudio:client
23 :network pulseaudio
24
25id: pulseaudio/pactl/ensure-commands-can-be-run-by-root
26category_id: pulseaudio
27_description: Ensure that the pulseaudio commands can be run only by root
28plugin: manual
29depends: pulseaudio/setup/ensure_interface_connection_setup
30_steps:
31 1. Try to run pactl
32 .
33 $ pulseaudio.pactl
34 .
35 2. Try to run paplay
36 .
37 $ pulseaudio.paplay
38 .
39 3. Try to run parec
40 .
41 $ pulseaudio.parec
42 .
43_verification:
44 Verify that each step ends with the following message:
45 This script must be run as root
46
47id: pulseaudio/pactl/ensure-modules-are-listed
48category_id: pulseaudio
49_description: Ensure that the correct modules are loaded
50plugin: manual
51depends: pulseaudio/setup/ensure_interface_connection_setup
52_steps:
53 1. List the loaded modules
54 .
55 $ sudo pulseaudio.pactl list short
56 .
57_verification:
58 Verify that you see output similar to following:
59 0 module-device-restore
60 1 module-stream-restore
61 2 module-card-restore
62 3 module-augment-properties
63 4 module-switch-on-port-available
64 5 module-udev-detect
65 ...
66 80 protocol-native.c pactl
67 0 alsa_card.pci-0000_00_1b.0 module-alsa-card.c
68 .
69 Verify that amongs the other the following modules are listed:
70 module-device-restore
71 module-stream-restore
72 module-card-restore
73 module-switch-on-port-available
74 module-rescue-streams
75 module-always-sink
76
77id: pulseaudio/parecord/ensure-audio-can-be-recorded
78category_id: pulseaudio
79_description: Ensure that it is possible to record audio
80plugin: manual
81depends: pulseaudio/setup/ensure_interface_connection_setup
82_steps:
83 1. Record an audio .wav file
84 .
85 $ sudo pulseaudio.parec ~/record.wav
86 .
87_verification:
88 Verify that the record.wav file has been created and it's size is
89 greater than zero. Verify that the recorded file can be played and
90 it is possible to hear the audio.
91
92id: pulseaudio/paplay/ensure-audio-can-be-played
93category_id: pulseaudio
94_description: Ensure that it is possible to play auio files
95plugin: manual
96depends: pulseaudio/setup/ensure_interface_connection_setup
97_steps:
98 1. Play an audio .wav file
99 .
100 $ sudo pulseaudio.paplay ~/file.wav
101 .
102_verification:
103 Verify that the audio is hearable through the speakers. In case the
104 speakers are not available verify that the sink status has changed
105 from SUSPEND to RUNNING [use the sudo pulseaudio.pactl list sinks
106 command for that]
diff --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
0new file mode 100644107new file mode 100644
index 0000000..e01dfe5
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu
@@ -0,0 +1,132 @@
1# Copyright 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Roberto Mier Escandon <roberto.escandon@canonical.com>
6
7unit: category
8id: serial_vault
9_name: Serial Vault
10
11id: serial_vault/setup/ensure_interface_connection_setup
12category_id: serial_vault
13_description: Ensure that the serial-vault interface is auto-connected
14plugin: manual
15_steps:
16 1. List the interfaces
17 .
18 $ snap interfaces serial-vault
19 .
20_verification:
21 Verify that you see the following:
22 :network serial-vault
23 :network-bind serial-vault
24
25id: serial_vault/setup/config
26category_id: serial_vault
27_description: Ensure that the serial-vault can access database
28plugin: manual
29depends: serial_vault/setup/ensure_interface_connection_setup
30_steps:
31 1. Create settings.yaml with proper content to access database. For example:
32 .
33 title: "Serial Vault"
34 logo: "/static/images/logo-ubuntu-white.svg"
35 mode: signing
36 docRoot: "."
37 driver: "postgres"
38 datasource: "dbname=serialvault sslmode=disable"
39 keystore: "database"
40 keystoreSecret: "secret code to encrypt the auth-key hash"
41 csrfAuthKey: "2E6ZYnVYUfDLRLV/ne8M6v1jyB/376BL9ORnN3Kgb04uSFalr2ygReVsOt0PaGEIRuID10TePBje5xdjIOEjQQ=="
42 urlHost: "serial-vault"
43 urlScheme: http
44 enableUserAuth: True
45 .
46 2. Apply config
47 .
48 $ cat settings.yaml | sudo serial-vault.config
49 .
50 3. Restart service
51 .
52 $ sudo systemctl restart snap.serial-vault.service.service
53 .
54 4. Check service status
55 .
56 $ sudo systemctl status snap.serial-vault.service.service
57 .
58_verification:
59 Verify that you see that service is active (running) and that the database has been created/updated, like this:
60 Created the 'keypair' table.
61 Created the 'model' table.
62 Created the 'settings' table.
63 Created the 'signinglog' table.
64 Created the 'nonce' table.
65 Created the 'account' table.
66 Updated the 'model' table.
67 Updated the 'keypair' table.
68 Created the 'openid nonce' table.
69 Created the 'userinfo' table.
70 Created the 'account-user link' table.
71 Updated the 'userinfo' table.
72 Starting service on port :8080
73
74id: serial_vault/operation/ensure-commands-can-be-run
75category_id: serial_vault
76_description: Ensure that the serial vault admin commands can be run
77plugin: manual
78depends: serial_vault/setup/config
79_steps:
80 1. Try to run admin
81 .
82 $ serial-vault.admin
83 .
84 2. Try to run config
85 .
86 $ serial-vault.config
87 .
88_verification:
89 Verify that each step ends showing up the help
90
91id: serial_vault/operation/add_superuser
92category_id: serial_vault
93_description: Ensure admin tool can add a superuser
94plugin: manual
95depends: serial_vault/operation/ensure-commands-can-be-run
96_steps:
97 1. Add a user from console
98 .
99 $ serial-vault.admin user add theuser -n TheName -r superuser -e theemail@email.com
100 .
101 2. List users
102 .
103 $ serial-vault.admin user list
104 .
105_verification:
106 Verify that just created user is in users list with superuser role
107
108id: serial_vault/operation/cache_account
109category_id: serial_vault
110_description: Ensure admin tool can fetch store cached account assertions
111plugin: manual
112depends: serial_vault/operation/ensure-commands-can-be-run
113_steps:
114 1. Fetch cached accounts from the store
115 .
116 $ serial-vault.admin account cache
117 .
118_verification:
119 Verify that output shows account and keypair processing from Ubuntu store
120
121id: serial_vault/operation/verify_api_is_reachable
122category_id: serial_vault
123_description: Ensure signing service can be reached
124plugin: manual
125depends: serial_vault/operation/ensure-commands-can-be-run
126_steps:
127 1. Request service version
128 .
129 $ wget http://localhost:8080/v1/version
130 .
131_verification:
132 Verify that the response content is {"version":"2.0-0"}
diff --git a/com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu b/com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu
0new file mode 100644133new file mode 100644
index 0000000..8f9e070
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/snapweb/snapweb.pxu
@@ -0,0 +1,182 @@
1# Copyright 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Roberto Mier Escandon <roberto.escandon@canonical.com>
6
7unit: category
8id: snapweb
9_name: SnapWeb
10
11id: snapweb/setup/ensure_interface_connection_setup
12category_id: snapweb
13_description: Ensure that the snapweb interfaces are auto-connected
14plugin: manual
15_steps:
16 1. List the interfaces
17 .
18 $ snap interfaces snapweb
19 .
20_verification:
21 Verify that you see the following:
22 Slot Plug
23 :network snapweb
24 :network-bind snapweb
25 :snapd-control snapweb
26 :timeserver-control snapweb
27
28id: snapweb/setup/ensure-http-service-is-up
29category_id: snapweb
30_description: Ensure that the http interface is up and running
31plugin: manual
32depends: snapweb/setup/ensure_interface_connection_setup
33_steps:
34 1. Open a browser in same device and type in address bar:
35 .
36 http://localhost:4200
37 .
38_verification:
39 Verify that url is accessible and a warning is shown about web access is
40 not secure/private (depending on the browser)
41
42id: snapweb/setup/ensure-https-service-is-up
43category_id: snapweb
44_description: Ensure that the snapweb web interface is up and running
45plugin: manual
46depends: snapweb/setup/ensure-http-service-is-up
47_steps:
48 1. Open a browser in same device and type in address bar:
49 .
50 http://localhost:4200
51 .
52 2. After warning alert showing that web access is not secure/private,
53 proceed to access localhost. In some browsers it is needed to confirm
54 a security exception.
55_verification:
56 Verify that url is accessible and browser shows a page with title
57 'Access Control', requesting a Snapweb Access Token to continue.
58 Verify that url address is now https://localhost:4201/access-control
59
60id: snapweb/setup/ensure-web-service-is-accessible-from-lan
61category_id: snapweb
62_description: Ensure that the snapweb web interface is accessible from lan
63plugin: manual
64depends: snapweb/setup/ensure-https-service-is-up
65_steps:
66 1. Open a browser in other device connected to same LAN than the one
67 hosting snapweb and type in address bar:
68 .
69 http://[hostname]:4200
70 .
71 2. After warning alert showing that web access is not secure/private,
72 proceed to access localhost. In some browsers it is needed to confirm
73 a security exception.
74_verification:
75 Verify that url is accessible and browser shows a page with title
76 'Access Control', requesting a Snapweb Access Token to continue.
77 Verify that url address is now https://[hostname]:4201/access-control
78
79id: snapweb/setup/ensure-token-access
80category_id: snapweb
81_description: Ensure ui allows access when entered a valid token generated from cli
82plugin: manual
83depends: snapweb/setup/ensure-https-service-is-up
84_steps:
85 1. Reboot the device. This step is only needed to be done just after
86 first installation. If snap was previously installed and this is
87 an update, you can go to step 2.
88 2. Open a terminal in the device and type:
89 .
90 $ sudo snapweb.generate-token
91 .
92 3. Copy result token to clipboard
93 4. Access browser and type:
94 .
95 https://localhost:4201
96 .
97 5. Paste clipboard token into Snapweb Access Token textbox
98_verification:
99 Verify that access is allowed and installed apps list is shown
100
101id: snapweb/snaps/installed-snaps
102category_id: snapweb
103_description: Verify installed snaps list
104plugin: manual
105depends: snapweb/setup/ensure-token-access
106_steps:
107 1. Access browser and type:
108 .
109 https://localhost:4201
110 .
111 2. In a device terminal type:
112 .
113 $ snap list
114 .
115_verification:
116 Verify that the list of 'Apps installed' in browser is the same
117 as the list shown in terminal, except snapweb itself that should
118 be only shown in terminal list
119
120id: snapweb/snaps/installable-snaps
121category_id: snapweb
122_description: Verify that snaps can be installed and filtered
123plugin: manual
124depends: snapweb/setup/ensure-token-access
125_steps:
126 1. Access browser and type:
127 .
128 https://localhost:4201
129 .
130 2. Click on last entry on Apps installed section named 'Get more apps'
131 or click on 'Store' upper tab
132 3. Click on the links over snaps to filter them
133 4. Search for certain snap name in upper search box
134_verification:
135 Verify that at the beginning there is a list of snaps that can be installed,
136 everyone with its icon, version, author and a button with label 'Install'.
137 Verify that the list can be filtered by pressing links over
138 Verify you get results when searching for a snap that it's in the list of
139 installables
140
141id: snapweb/snaps/install-snap
142category_id: snapweb
143_description: Ensure that a snap can be installed using web ui
144plugin: manual
145depends: snapweb/setup/ensure-token-access
146_steps:
147 1. Access browser and type:
148 .
149 https://localhost:4201
150 .
151 2. Click on 'Install' button of any available snap
152 3. Wait for snap to be installed and open a terminal
153 4. Type in terminal:
154 .
155 $ snap list
156 .
157_verification:
158 Verify that the snap requested to be installed is there in the terminal resultant list
159 Verify that button in step 2 changes its label to 'Installing' while installing
160 Verify that button of the instaled snap has now 'Remove' in its label
161
162id: snapweb/snaps/remove-snap
163category_id: snapweb
164_description: Ensure that a snap can be removed using web ui
165plugin: manual
166depends: snapweb/snaps/install-snap
167_steps:
168 1. Access browser and type:
169 .
170 https://localhost:4201
171 .
172 2. Click on 'Remove' button of installed snap
173 3. Wait for snap to be removed and open a terminal
174 4. Type in terminal:
175 .
176 $ snap list
177 .
178_verification:
179 Verify that the snap requested to be removed is not in the terminal resultant list
180 Verify that button in step 2 changes its label to 'Removing' while installing
181 Verify that button of the removed snap has now 'Install' in its label
182
diff --git a/com.canonical.se:engineering-tests/units/test-plan.pxu b/com.canonical.se:engineering-tests/units/test-plan.pxu
0new file mode 100644183new file mode 100644
index 0000000..a7f31d1
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/test-plan.pxu
@@ -0,0 +1,9 @@
1id: engineering-tests
2unit: test plan
3_name: System Enablement Engineering Tests
4_description:
5 Set of tests to verify functionality of the snaps produced by the
6 System Enablement team at Canonical.
7estimated_duration: 2h
8include:
9 2017.com.canonical.se::.*
diff --git a/com.canonical.se:engineering-tests/units/tpm/tpm.pxu b/com.canonical.se:engineering-tests/units/tpm/tpm.pxu
0new file mode 10064410new file mode 100644
index 0000000..b00bd89
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/tpm/tpm.pxu
@@ -0,0 +1,135 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Scott Sweeny <scott.sweeny@canonical.com>
6
7unit: category
8id: tpm1.2
9_name: TPM 1.2
10
11id: tpm1.2/setup/ensure_interface_connection_setup
12category_id: tpm1.2
13_description: Ensure that the tpm1.2 interfaces are connected
14plugin: manual
15_steps:
16 1. Connect required tpm1.2 slots/plugs
17 .
18 $ sudo snap connect tpm:network :network
19 $ sudo snap connect tpm:network-bind :network-bind
20 $ sudo snap connect tpm:tpm :tpm
21 .
22_verification:
23 Verify that you see the following when running snap interfaces:
24 :network tpm
25 :network-bind tpm
26 :tpm tpm
27
28id: tpm1.2/setup/get_version
29category_id: tpm1.2
30plugin: manual
31depends: tpm1.2/setup/ensure_interface_connection_setup
32_summary: Can get version information from the TPM chip
33_purpose:
34 Check that basic communication with the TPM chip is working and that version
35 information can be retrieved with the expected command.
36_steps:
37 1. Execute the following command to show the TPM version:
38 .
39 $ /snap/bin/tpm.version
40_verification:
41 Output is similar to below with all fields showing data:
42 .
43 TPM 1.2 Version Info:
44 Chip Version: 1.2.5.81
45 Spec Level: 2
46 Errata Revision: 3
47 TPM Vendor ID: WEC
48 Vendor Specific data: 0000
49 TPM Version: 01010000
50 Manufacturer Info: 57454300
51
52id: tpm1.2/setup/self_test
53category_id: tpm1.2
54plugin: manual
55depends: tpm1.2/setup/ensure_interface_connection_setup
56_summary: TPM self test runs successfully
57_purpose:
58 Check that the TPM self test runs successfully and returns no errors.
59_steps:
60 1. Execute the following command to run the TPM self test:
61 .
62 $ /snap/bin/tpm.selftest
63_verification:
64 Output is similar to below (actual values are not important) and no
65 error messages are shown:
66 .
67 TPM Test Results:
68 ff010205 51ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
69 ffffffff ffffffff ffffffff ffff0000 00000000 00000000 00000000 00000000
70 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000
71
72
73id: tpm1.2/configuration/take_ownership
74category_id: tpm1.2
75plugin: manual
76depends: tpm1.2/setup/ensure_interface_connection_setup
77_summary: Taking ownership of the device is possible
78_purpose:
79 Check that you are able to take ownership of the device using TPM commands.
80_steps:
81 1.Execute the following command to take ownership of the TPM chip:
82 .
83 $ /snap/bin/tpm.takeownership
84 .
85_verification:
86 Verify that you are prompted for both the owner key and the SRK (storage
87 root key) and that no errors are returned.
88 .
89 NOTE: This command will only work if it has not been run before. You can
90 reset the TPM with:
91 .
92 $ /snap/bin/tpm.clear
93 .
94 Which will invalidate all existing keys and passwords and disable the chip.
95 Once this is done you must re-enable the TPM from the device's BIOS before
96 it can be used.
97
98id: tpm1.2/crypto/show_public_key
99category_id: tpm1.2
100plugin: manual
101depends: tpm1.2/setup/ensure_interface_connection_setup
102_summary: Showing the public endorsement key succeeds
103_purpose:
104 Check to make sure that the endorsement key pair exists and the public key
105 can be queried.
106_steps:
107 1. Execute the following command to see the public key:
108 .
109 $ /snap/bin/tpm.getpubek
110 .
111 You may see an error similar to:
112 .
113 Tspi_TPM_GetPubEndorsementKey failed: 0x00000008 - layer=tpm, code=0008 (8), The TPM target command has been disabled
114 .
115 This can be safely ignored as long as the public key data is displayed.
116_verification:
117 Verify that the public key data is shown, for example:
118 .
119 Public Endorsement Key:
120 Version: 01010000
121 Usage: 0x0002 (Unknown)
122 Flags: 0x00000000 (!VOLATILE, !MIGRATABLE, !REDIRECTION)
123 AuthUsage: 0x00 (Never)
124 Algorithm: 0x00000020 (Unknown)
125 Encryption Scheme: 0x00000012 (Unknown)
126 Signature Scheme: 0x00000010 (Unknown)
127 Public Key:
128 8b59fad6 83514128 d56e2aa0 5eef7cff ad23c90d 0dd9b1e2 31ef093d 72d947d8
129 e02fbe3a 3c235ff0 9c487973 40a28c9b 8b83aaaf dc1254ad 31a95410 811742e5
130 92c16823 6f663413 f7067d3a 9af09ccc 12944a13 51d32980 59a98740 4008ab0c
131 07b7d93b 9393691c 8ae7d84c 5fd4fcef 147934f1 09326225 d5d1b652 ab3e12ee
132 fbd1cfba b18abedc de2215cb 97006b92 839fd9a4 3158bc8f 028fe516 550905b3
133 e3eef1e1 9f8dd3ab 331cbe62 d32ce937 0c11ad41 1d2e50f3 c69c7cde cd0bf564
134 4b7b16f8 0885dc66 d4411aba a824c1f1 ea8aa743 5c62fad7 e9540b85 5c0dc7af
135 3c1615ae 56af18e4 770aa107 06ef274b 202e2e3e d4c280d8 5ca9e886 9d889e31
diff --git a/com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu b/com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu
0new file mode 100644136new file mode 100644
index 0000000..7667aa5
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/udisks2/udisks2.pxu
@@ -0,0 +1,319 @@
1# Copyright 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Scott Sweeny <scott.sweeny@canonical.com>
6
7unit: category
8id: udisks2
9_name: UDisks2
10
11id: udisks2/setup/ensure_interface_connection_setup
12category_id: udisks2
13_description: Ensure that the udisks2 interfaces are connected
14plugin: manual
15_steps:
16 1. Run the following:
17 $ sudo snap interfaces udisks2
18 .
19_verification:
20 Verify that you see the following:
21 Slot Plug
22 :mount-observe udisks2
23 :network-bind udisks2
24 udisks2:service udisks2:client
25 - udisks2:hardware-observe
26
27id: udisks2/client/can_communicate_with_udisksd
28category_id: udisks2
29plugin: manual
30depends: udisks2/setup/ensure_interface_connection_setup
31_summary: udisksctl can communicate with udisksd
32_purpose:
33 Makes sure udisksctl can communicate with udisksd
34_steps:
35 1. Run a simple udisksctl command
36 .
37 $ sudo udisks2.udisksctl status
38 .
39_verification:
40 Verify that the command returns a list of connected storage devices and no
41 errors.
42
43id: udisks2/service/can_receive_hotplug_events
44category_id: udisks2
45plugin:manual
46depends: udisks2/client/can_communicate_with_udisksd
47_summary: udisks can see when a drive is plugged in
48_purpose:
49 Makes sure that udisks gets the hotplug event when a USB drive is
50 plugged in
51_steps:
52 1. Start the udisks client and have it watch for new events
53 .
54 $ sudo udisks2.udisksctl monitor
55 .
56 2. Plug in a USB storage device and wait for activity from the client
57 .
58 3. Unplug the USB storage device and wait for activity from the client
59 .
60_verification:
61 Verify that udisks shows information about the USB device when it's plugged
62 in, and that it recognizes when the device is removed.
63 .
64 The information shown when the device is plugged in will be everything
65 udisks knows about the device and its partitions, expressed as DBus objects.
66 You will likely see something like:
67 .
68 21:37:20.621: Added /org/freedesktop/UDisks2/drives/Kingston_DataTraveler_2_2e0_0607151625382
69 org.freedesktop.UDisks2.Drive:
70 CanPowerOff: true
71 Configuration: {}
72 ConnectionBus: usb
73 Ejectable: true
74 Id: Kingston-DataTraveler-2.0-0607151625382
75 Media: thumb
76 MediaAvailable: true
77 MediaChangeDetected: true
78 .
79 and so on for the drive itself, each block device, and each filesystem
80
81id: udisks2/service/can_mount_unmount
82category_id: udisks2
83plugin: manual
84depends: udisks2/client/can_communicate_with_udisksd
85_summary: udisks can mount and unmount a storage device
86_purpose:
87 Makes sure that udisks can mount and unmount a storage device, and that
88 the mount points are visible outside of the snap
89_steps:
90 1. Plug in a USB storage device
91 2. Run the following:
92 .
93 $ sudo udisks2.udisksctl status
94 .
95 and note the name under the "DEVICE" column for the drive you just
96 plugged in. It should be "sdb" or similar
97 3. Mount the filesystem on the device:
98 .
99 $ sudo udisks2.udisksctl mount -b /dev/<device>1
100 .
101 Where <device> is the value from the status call above. This should mount
102 the first filesystem on the device and return the path
103 4. Examine the mount point:
104 .
105 $ sudo -s # You must be root to see the mount point
106 $ ls /mountpoint/path/returned/above
107 .
108 Make sure the contents of that directory match what you expect to see on
109 the drive.
110 .
111 Leave the root shell
112 $ exit
113 5. Unmount the filesystem:
114 .
115 $ sudo udisks2.udisksctl unmount -b /dev/<device>1
116_verification:
117 Verify that mounts and unmounts are performed successfully, and that the
118 contents of the drive can be seen from your shell (i.e. outside of the snap's
119 own namespace)
120
121id: udisks2/automount/default_off
122category_id: udisks2
123plugin: manual
124depends: udisks2/setup/ensure_interface_connection_setup
125_summary: The automount option defaults to off
126_purpose:
127 Makes sure that the automount option defaults to disabled
128_steps:
129 1. Install the udisks2 snap fresh (i.e. not an upgrade)
130 2. Run the following:
131 .
132 $ sudo snap get udisks2 automount.enable
133_verification:
134 Verify that the returned value is "false"
135
136id: udisks2/automount/disabling_works
137category_id: udisks2
138plugin: manual
139depends: udisks2/automount/default_off
140_summary: Disabling automount actually disables automount
141_purpose:
142 Makes sure that when automount.enabled is set to "false" automounts are
143 prevented
144_steps:
145 1. Make sure that automount is disabled. Run:
146 .
147 $ sudo snap set udisks2 automount.enable=false
148 2. Plug in a USB storage device
149_verification:
150 Verify that no filesystem on the USB device was mounted. /media/root/ should
151 be empty
152
153id: udisks2/automount/automount_works
154category_id: udisks2
155plugin: manual
156depends: udisks2/automount/default_off
157_summary: When enabled, automounting works
158_purpose:
159 Makes sure that automounting a USB drive works when the option is enabled
160_steps:
161 1. Make sure that automount is enabled. Run:
162 .
163 $ sudo snap set udisks2 automount.enable=true
164 2. Plug in a USB storage drive
165_verification:
166 Verify that the filesystem on the USB device was mounted to
167 /media/root/<filesystem label>, for example /media/root/7C69-3855
168
169id: udisks2/automount/automount_does_not_mount_system_devices
170category_id: udisks2
171plugin: manual
172depends: udisks2/automount/automount_works
173_summary: When enabled, automount does not mount system devices
174_purpose:
175 Makes sure that automount is only restricted to pluggable devices, not system
176_steps:
177 1. Make sure that automount is enabled. Run:
178 .
179 $ sudo snap set udisks2 automount.enable=true
180 3. Reboot the device and wait for it to power on again
181 4. Run the following:
182 .
183 $ sudo udisks2.udisksctl status
184 .
185 and check the names under the "DEVICE" column. It should just contain
186 thumb drives [if any is plugged-in] and the filesystem. For example,
187 in case of RaspberryPi it would contain just: mmcblk0.
188 Make sure that system devices, such as an ESP partition, are
189 not displayed here.
190 5. Examine the mount point:
191 .
192 $ sudo -s # You must be root to see the mount point
193 $ ls /media/root
194 .
195 Make sure the contents of that directory match what you expect to see on
196 the drive.
197 .
198 Leave the root shell
199 $ exit
200_verification:
201 Verify that none of the system devices were mounted and their filesystems
202 are not available /media/root/<filesystem label>
203
204id: udisks2/automount/automount_does_mount_usb_devices_plugged_before_boot
205category_id: udisks2
206plugin: manual
207depends: udisks2/automount/automount_works
208_summary: When enabled, automount mount USB devices plugged before boot
209_purpose:
210 Makes sure that system can mount devices plugged in before boot
211_steps:
212 1. Make sure that automount is enabled. Run:
213 .
214 $ sudo snap set udisks2 automount.enable=true
215 2. Switch the device off, insert USB flash drive and boot the device again
216 3. Run the following:
217 .
218 $ sudo udisks2.udisksctl status
219 .
220 and check the names under the "DEVICE" column. It should contain the device
221 that has been plugged before booting.
222 4. Examine the mount point:
223 .
224 $ sudo -s # You must be root to see the mount point
225 $ ls /media/root
226 .
227 Make sure the contents of that directory match what you expect to see on
228 the drive.
229 .
230 Leave the root shell
231 $ exit
232_verification:
233 Verify that the cold-plugged device is mounted on boot
234
235id: udisks2/automount/automount_works_after_manual_unmount
236category_id: udisks2
237plugin: manual
238depends: udisks2/automount/automount_works
239_summary: When enabled, automount still works after unmount has been called manually
240_purpose:
241 Make sure that the system can auto mount devices after the unmount has been called
242_steps:
243 1. Make sure that automount is enabled. Run:
244 .
245 $ sudo snap set udisks2 automount.enable=true
246 2. Insert USB flash drive
247 3. Examine the mount point:
248 .
249 $ sudo ls /media/root
250 .
251 Make sure the USB drive that just have been plugged in is listed there.
252 4. Run the following:
253 .
254 $ sudo udisks2.udisksctl status
255 .
256 and check the names under the "DEVICE" column. It should contain the device
257 that has been plugged before booting.
258 5. Unmount manually:
259 .
260 $ sudo udisks2.udisksctl unmount -b /dev/<device>1
261 6. Insert another USB flash drive
262 7. Examine the mount point:
263 .
264 $ sudo ls /media/root
265 .
266 Make sure the USB drive that just have been plugged in is listed there.
267_verification:
268 Verify that the USB drive that has been plugged in after the first one has
269 been unmounted manually is mounted.
270
271id: udisks2/debug/default_off
272category_id: udisks2
273plugin: manual
274depends: udisks2/setup/ensure_interface_connection_setup
275_summary: The debug option defaults to off
276_purpose:
277 Makes sure that the debug option defaults to disabled
278_steps:
279 1. Install the udisks2 snap fresh (i.e. not an upgrade)
280 2. Run the following:
281 .
282 $ sudo snap get udisks2 debug.enable
283_verification:
284 Verify that the returned value is "false"
285
286id: udisks2/debug/disabling_works
287category_id: udisks2
288plugin: manual
289depends: udisks2/debug/default_off
290_summary: Disabling debug actually disables debug logging
291_purpose:
292 Makes sure that when debug.enabled is set to "false" no loggs are written
293_steps:
294 1. Make sure that debug is disabled. Run:
295 .
296 $ sudo snap set udisks2 debug.enable=false
297 2. Plug in a USB storage device
298_verification:
299 Verify that no debug information coming from files such as jobs.go,
300 dispatcher.go, udisks2.go is written to the journal.
301
302id: udisks2/automount/debug_works
303category_id: udisks2
304plugin: manual
305depends: udisks2/debug/default_off
306_summary: When debug is enabled logs are available
307_purpose:
308 Makes sure that when debug option is enabled the logs are available
309_steps:
310 1. Make sure that debug is enabled. Run:
311 .
312 $ sudo snap set udisks2 debug.enable=true
313 2. Restart ciborium service for the above change to take effect
314 .
315 $ sudo systemctl restart snap.udisks2.ciborium.service
316 3. Plug in a USB storage drive
317_verification:
318 Verify that debug information coming from udisks2 snap (files such as
319 jobs.go, dispatcher.go, udisks2.go) is written to the journal.
diff --git a/com.canonical.se:engineering-tests/units/upower/00_general.pxu b/com.canonical.se:engineering-tests/units/upower/00_general.pxu
0new file mode 100644320new file mode 100644
index 0000000..3ab4d2d
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/upower/00_general.pxu
@@ -0,0 +1,52 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Simon Fels <simon.fels@canonical.com>
6
7unit: category
8id: upower
9_name: UPower
10
11id: upower/general/can_be_installed
12category_id: upower
13_description: Ensure that the upower snap can be installed
14plugin: manual
15_steps:
16 Install upower snap from the appropiate channel via the following command
17 .
18 $ snap install --candidate upower
19 .
20 NOTE: Depending on which channel you want to test you need to select the
21 right one. The command above uses the candidate channel as that is the
22 most used one.
23_verification:
24 The installation of the snap should finish with no errors.
25
26id: upower/general/service_started
27category_id: upower
28_description: Ensure that the upowerd service is up and running
29plugin: manual
30_steps:
31 Check service status with the following command
32 $ systemctl status snap.upower.service.service
33_verification:
34 Output should look like this:
35 snap.upower.upowerd.service - Service for snap application upower.upowerd
36 Loaded: loaded (/etc/systemd/system/snap.upower.upowerd.service; enabled; vendor preset: enabled)
37 Active: active (running) since Thu 2016-12-15 16:13:37 UTC; 54ms ago
38 Main PID: 4265 (upowerd)
39 CGroup: /system.slice/snap.upower.upowerd.service
40 4265 /snap/upower/x1/usr/libexec/upowerd
41
42id: upower/general/client_can_talk_to_service
43category_id: upower
44_description: Verify that the upower client can talk to the service
45plugin: manual
46_steps:
47 Enumerate available devices available on the system:
48 $ upower -e
49_verification:
50 Output should look like this and at least one device should be present:
51 /org/freedesktop/UPower/devices/battery_BAT0
52 /org/freedesktop/UPower/devices/DisplayDevice
diff --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
0new file mode 10064453new file mode 100644
index 0000000..d5fe6b1
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/upower/10_battery_powered.pxu
@@ -0,0 +1,129 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Simon Fels <simon.fels@canonical.com>
6
7id: upower/battery_powered/battery_detected
8category_id: upower
9_description: Verify upower is able to detect the battery of the system
10plugin: manual
11_steps:
12 Query upowerd for available power devices on the system
13 $ upower -d
14_verification:
15 The output should be similar to the following and should list the
16 battery of your system:
17 .
18 Device: /org/freedesktop/UPower/devices/line_power_AC
19 native-path: AC
20 power supply: yes
21 updated: Do 15 Dez 2016 15:06:55 CET (7163 seconds ago)
22 has history: no
23 has statistics: no
24 line-power
25 warning-level: none
26 online: yes
27 icon-name: 'ac-adapter-symbolic'
28 .
29 Device: /org/freedesktop/UPower/devices/battery_BAT0
30 native-path: BAT0
31 vendor: SANYO
32 model: 45N1779
33 serial: 115
34 power supply: yes
35 updated: Do 15 Dez 2016 17:05:18 CET (60 seconds ago)
36 has history: yes
37 has statistics: yes
38 battery
39 present: yes
40 rechargeable: yes
41 state: fully-charged
42 warning-level: none
43 energy: 97,05 Wh
44 energy-empty: 0 Wh
45 energy-full: 97,13 Wh
46 energy-full-design: 99,47 Wh
47 energy-rate: 7,983 W
48 voltage: 12,374 V
49 percentage: 99%
50 capacity: 97,6475%
51 technology: lithium-ion
52 icon-name: 'battery-full-charged-symbolic'
53 .
54 Device: /org/freedesktop/UPower/devices/DisplayDevice
55 power supply: yes
56 updated: Do 15 Dez 2016 16:41:14 CET (1504 seconds ago)
57 has history: no
58 has statistics: no
59 battery
60 present: yes
61 state: fully-charged
62 warning-level: none
63 energy: 97,05 Wh
64 energy-full: 97,13 Wh
65 energy-rate: 7,983 W
66 percentage: 99%
67 icon-name: 'battery-full-charged-symbolic'
68 .
69 Daemon:
70 daemon-version: 0.99.4
71 on-battery: no
72 lid-is-closed: no
73 lid-is-present: yes
74 critical-action: PowerOff
75
76id: upower/battery_powered/battery_discharging
77category_id: upower
78_description: Verify upower reports discharging battery
79plugin: manual
80_steps:
81 1. Unplug the power cable from your battery powered device
82 2. Listen to reported changes from upower
83 $ upower -m
84_verification:
85 Leave the monitor running for some time. It should report the device changes
86 for the battery device:
87 .
88 [17:22:55.277]device changed: /org/freedesktop/UPowerr/devices/battery_BAT0
89 [17:22:55.277]device changed: /org/freedesktop/UPower/devices/battery_BAT0
90 .
91 Verify with the following command that the actual battery capacity is changing
92 .
93 $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | capacity
94 capacity: 97,6475%
95 .
96 and that the state of the battery device is changed to 'discharging'
97 .
98 $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state
99 state: discharging
100
101id: upower/battery_powered/low_battery_causes_poweroff
102category_id: upower
103_description: Verify upower reports discharging battery
104plugin: manual
105_steps:
106 A battery with a low capacity should cause the device to power off. This
107 involves as a first step to wait until the battery of the device under test
108 is close to being empty. The default trigger of the poweroff action is by
109 default at <= 2%
110 .
111 Depending on how full your device battery is you have to wait some time
112 until it is discharged enough.
113 .
114 Watch the system via
115 .
116 $ sudo journalctl --no-pager -f
117_verification:
118 Once the defined threshold of the battery capacity is reached the system
119 should power off itself. You can spot this by looking at the output
120 of the journalctl command which should print something like:
121 .
122 Dec 15 16:37:02 localhost.localdomain systemd-logind[1022]: System is powering down
123 [...]
124 Dec 15 16:37:02 localhost.localdomain systemd[1]: Starting Power-Off...
125 Dec 15 16:37:02 localhost.localdomain systemd[1]: Starting Update UTMP about System Runlevel Changes...
126 Dec 15 16:37:02 localhost.localdomain systemd[1]: Started Power-Off.
127 Dec 15 16:37:02 localhost.localdomain systemd[1]: Started Update UTMP about System Runlevel Changes.
128 Dec 15 16:37:02 localhost.localdomain systemd[1]: Reached target Power-Off.
129 Dec 15 16:37:02 localhost.localdomain systemd-logind[1022]: Operation 'shutdown' finished.
diff --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
0new file mode 100644130new file mode 100644
index 0000000..169f0e3
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/upower/20_ac_powered.pxu
@@ -0,0 +1,49 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Simon Fels <simon.fels@canonical.com>
6
7id: upower/ac_powered/source_detected
8category_id: upower
9_description: Verify upower is able to detect the AC power source
10plugin: manual
11_steps:
12 Query upowerd for available power devices on the system
13 .
14 $ upower -e
15_verification:
16 The AC power source should be listed in the result, e.g.:
17 .
18 /org/freedesktop/UPower/devices/line_power_AC
19
20id: upower/ac_powered/status_plugged
21category_id: upower
22_description: Verify upower report AC source as plugged
23plugin: manual
24_steps:
25 Plug in the AC adapter to your device and query upower with
26 .
27 $ upower -i /org/freedesktop/UPower/devices/line_power_AC | grep online
28 for the online status of the source.
29_verification:
30 The output should be
31 .
32 online: yes
33 .
34 If the source is not plugged upower will report a "no" instead of "yes".
35
36id: upower/ac_powered/status_unplugged
37category_id: upower
38_description: Verify upower report AC source as unplugged
39plugin: manual
40_steps:
41 Unplug the AC adapter from your device and query upower with
42 $ upower -i /org/freedesktop/UPower/devices/line_power_AC | grep online
43 for the online status of the source.
44_verification:
45 The output should be
46 .
47 online: no
48 .
49 If the source is plugged upower will report a "yes" instead of "no".
diff --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
0new file mode 10064450new file mode 100644
index 0000000..2f61369
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/wifi-ap/wifi-ap.pxu
@@ -0,0 +1,213 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Jim Hodapp <jim.hodapp@canonical.com>
6# Simon Fels <simon.fels@canonical.com>
7# Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
8
9unit: category
10id: wifi_ap
11_name: WiFi Access Point
12
13id: wifi_ap/setup/ensure_interface_connection_setup
14category_id: wifi_ap
15_description: Ensure that the wifi_ap interfaces are connected
16plugin: manual
17_steps:
18 0. If the wifi-ap snap is already installed remove it via
19 .
20 $ snap remove wifi-ap
21 .
22 1. Network Manager setup
23 .
24 For snaps on Classic:
25 NetworkManager is part of the base Ubuntu Desktop system
26 and does not need to be installed again.
27 .
28 For an Ubuntu Core system you have to install
29 the NetworkManager snap from the Ubuntu store.
30 $ snap install network-manager
31 .
32 2. Install now the wifi-ap snap via
33 .
34 $ snap install wifi-ap
35 .
36_verification:
37 Verify that you see the following when running snap interfaces:
38 :firewall-control wifi-ap
39 :network-control wifi-ap
40 :network wifi-ap
41 :network-bind wifi-ap
42 .
43 For snaps on Classic:
44 :network-manager wifi-ap
45 .
46 For full-snap based system:
47 network-manager:service wifi-ap:network-manager
48
49id: wifi_ap/configuration/get_all
50category_id: wifi_ap
51plugin: manual
52depends: wifi_ap/setup/ensure_interface_connection_setup
53_summary: All WiFi AP configuration items are listed
54_purpose:
55 Check if the configuration of the WiFi AP can be listed
56 with the expected command.
57_steps:
58 1. Execute the following command to retrieve all configuration items:
59 .
60 $ /snap/bin/wifi-ap.config get
61_verification:
62 All available configuration items are listed as output.
63
64id: wifi_ap/configuration/set_any
65category_id: wifi_ap
66plugin: manual
67depends: wifi_ap/setup/ensure_interface_connection_setup
68_summary: Setting any configuration key is possible
69_purpose:
70 Check if any configuration key can be set via the
71 configuration system of the snap.
72_steps:
73 1. Retrieve the current value of a specific configuration item
74 e.g. 'wifi.interface'.
75 .
76 $ /snap/bin/wifi-ap.config get wifi.interface
77 .
78 2. Set a new value for the same configuration item
79 .
80 $ sudo /snap/bin/wifi-ap.config set wifi.interface=wlan1
81 .
82 3. Retrieve the current value of the same configuration item
83 for comparison.
84 .
85 $ /snap/bin/wifi-ap.config get wifi.interface
86_verification:
87 Verify that the new value for the configuration is not the same
88 as before the 'set' operation and is now the the value specified
89 in step 2.
90
91id: wifi_ap/connect/enable_ap
92category_id: wifi_ap
93plugin: manual
94depends: wifi_ap/setup/ensure_interface_connection_setup
95_summary: Enabling the AP succeeds
96_purpose:
97 Check to make sure the AP can be enabled.
98_steps:
99 0. If the AP is already enabled as on some devices where the
100 automated wizard was able to find a good configuration
101 automatically you can skip the following steps. You can
102 verify if the AP is active by calling
103 .
104 $ /snap/bin/wifi-ap.status
105 ap.active: true
106 .
107 1. Look up and set the wifi interface to the proper name
108 e.g. from default wlan0 to enp0s3
109 .
110 $ ifconfig
111 $ /snap/bin/wifi-ap.config set wifi.interface=<interface_name>
112 .
113 2. Enable the AP with the default configuration for other key values
114 .
115 $ sudo /snap/bin/wifi-ap.config set disabled=false
116 .
117 3. Verify that the AP is enabled by looking at the key/value pair
118 .
119 $ /snap/bin/wifi-ap.config get disabled
120_verification:
121 Verify that the new value for the disabled is set to false. Also verify that a
122 different machine such as a phone or a laptop can connect to the AP using
123 SSID of "Ubuntu" and no security type.
124
125id: wifi_ap/configuration/control_socket
126category_id: wifi_ap
127plugin: manual
128depends: wifi_ap/setup/ensure_interface_connection_setup
129_summary: Check content interface
130_purpose:
131 Check if the content interface is accessible and
132 it exports a socket for a consumer snap.
133_steps:
134 1. Install the wifiap-consumer snap
135 .
136 $ sudo snap install wifiap-consumer
137 .
138 2. Connect the wifi-ap and wifiap-consumer content interface
139 .
140 $ sudo snap connect wifiap-consumer:control wifi-ap:control
141 .
142 3. Get the configuration with the unix HTTP client
143 .
144 $ sudo wifiap-consumer.unixhttpc /v1/configuration
145 .
146_verification:
147 Verify that the configuration is a valid JSON with reasonable data, like:
148 {
149 "result": {
150 "debug": false,
151 "disabled": false,
152 "wifi.interface": "wlan0",
153 "wifi.security": "open",
154 "wifi.ssid": "Ubuntu"
155 },
156 "status": "OK",
157 "status-code": 200,
158 "type": "sync"
159 }
160
161id: wifi_ap/configuration/default_ssid
162category_id: wifi_ap
163plugin: manual
164_summary: WiFi AP default SSID is set from gadget snap
165_purpose:
166 Check if the configuration of the WiFi AP SSID is set to the value
167 coming from the gadget snap, when present.
168_steps:
169 1. Install a gadget snap which contains in gadget.yaml:
170 .
171 defaults:
172 # Below snap ID matches the one assigned for wifi-ap in the Ubuntu Store
173 2rGgvyaY0CCzlWuKAPwFtCWrgwkM8lqS:
174 default.wifi.ssid: GadgetSnap
175 .
176 2. Reboot
177 3. Remove wifi-ap if present:
178 .
179 $ snap remove wifi-ap
180 .
181 4. Install wifi-ap (this must be done from the store, otherwise the gadget
182 will not set the defaults for the snap). Assuming we are testing candidate:
183 .
184 $ snap install --candidate wifi-ap
185 .
186 5. Get the SSID value:
187 .
188 $ /snap/bin/wifi-ap.config get wifi.ssid
189 .
190_verification:
191 Check that wifi.ssid=GadgetSnap
192
193id: wifi_ap/configuration/country_code
194category_id: wifi_ap
195plugin: manual
196depends: wifi_ap/connect/enable_ap
197_summary: WiFi AP sends the country code IE in beacon frames
198_purpose:
199 Check if the WiFi AP sends the configured country code in beacon frames
200_steps:
201 1. Set the ISO/IEC 3166-1 code of the country you are in at the moment,
202 for instance
203 .
204 $ sudo wifi-ap.config set wifi.country-code=ES
205 .
206 2. Use a device with wifi to capture the beacon frames. You have to
207 turn on monitor mode for the wifi card to achieve this. See, for
208 instance https://sandilands.info/sgordon/capturing-wifi-in-monitor-mode-with-iw.
209 3. Capture the packets with tcpdump or wireshark
210 4. Check that the beacon frames from the SSID from the device where
211 you are testing wifi-ap contain the country code information element.
212_verification:
213 Check that IE contains the configure country code.
diff --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
0new file mode 100644214new file mode 100644
index 0000000..78fce85
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/wifi-connect/wifi.connect.pxu
@@ -0,0 +1,202 @@
1# Copyright 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Roberto Mier Escandon <roberto.escandon@canonical.com>
6
7unit: category
8id: wifi-connect
9_name: WiFi Connect
10
11id: wifi-connect/setup/ensure_interface_connection_setup
12category_id: wifi-connect
13_description: Ensure that the wifi-connect interfaces are connected
14plugin: manual
15_steps:
16 0. If the wifi-connect snap is already installed remove it via
17 .
18 $ snap remove wifi-connect
19 .
20 1. Network Manager setup
21 .
22 For snaps on Classic:
23 NetworkManager is part of the base Ubuntu Desktop system
24 and does not need to be installed again.
25 .
26 For an Ubuntu Core system you have to install
27 the NetworkManager snap from the Ubuntu store.
28 $ snap install network-manager
29 .
30 2. Wifi AP setup
31 .
32 You have to install Wifi AP snap.
33 $ snap install wifi-ap
34 .
35 3. Install now the wifi-connect snap via
36 .
37 $ snap install wifi-connect
38 .
39 4. Connect wifi-connect interfaces
40 .
41 $ snap connect wifi-connect:control wifi-ap:control
42 $ snap connect wifi-connect:network core:network
43 $ snap connect wifi-connect:network-bind core:network-bind
44 .
45 For snaps on Classic you have to connect:
46 $ snap connect wifi-connect:network-manager core:network-manager
47 .
48 For an Ubuntu Core system you have to connect:
49 $ snap connect wifi-connect:network-manager network-manager:service
50 .
51_verification:
52 Verify that you see the following when running snap interfaces:
53 :firewall-control wifi-ap
54 :network-control wifi-ap
55 :network wifi-ap,wifi-connect
56 :network-bind wifi-ap,wifi-connect
57 wifi-ap:control wifi-connect
58 .
59 For snaps on Classic:
60 :network-manager wifi-ap,wifi-connect
61 .
62 For full-snap based system:
63 network-manager:service wifi-ap:network-manager,wifi-connect:network-manager
64
65id: wifi-connect/configuration/network_manager_does_not_control_network_before_reboot
66category_id: wifi-connect
67plugin: manual
68depends: wifi-connect/setup/ensure_interface_connection_setup
69_summary: NetworkManager does not control all networking before rebooting
70_purpose:
71 Check if netplan is configured for NetworkManager to control networking
72_steps:
73 0. Backup existing /etc/netplan/00-snapd-config.yaml file
74 .
75 $ mv /etc/netplan/00-snapd-config.yaml ~/
76 .
77 1. Create a new netplan config file named /etc/netplan/00-default-nm-renderer.yaml
78 .
79 $ echo -e "network:\n renderer: NetworkManager" > /etc/netplan/00-default-nm-renderer.yaml
80 .
81 2. See current managed devices by NetworkManager:
82 .
83 $ nmcli d
84 .
85_verification:
86 Verify that wireless device (wlan0 by default) STATE column value does not equals to 'connected' or 'disconnected'
87
88id: wifi-connect/configuration/network_manager_controls_network_after_reboot
89category_id: wifi-connect
90plugin: manual
91depends: wifi-connect/configuration/network_manager_does_not_control_network_before_reboot
92_summary: NetworkManager controls network after configure netplan file and reboot
93_steps:
94 0. Reboot the device
95 .
96 $ sudo reboot
97 .
98 1. When the device finished booting, check nm status with the following command:
99 .
100 $ nmcli d
101 .
102_verification:
103 Verify that wireless device (wlan0 by default) STATE column value does NOT equals to 'unmanaged'.
104 If it is connected to external Wi-Fi, it should be displayed in green with 'connected' state, and
105 if it is not connected to external Wi-Fi, it should be shown in red iwth 'disconnected' state
106
107id: wifi-connect/configuration/content_interface_is_plugged_after_reboot
108category_id: wifi-connect
109plugin: manual
110depends: wifi-connect/configuration/network_manager_controls_network_after_reboot
111_summary: Check that wifi-ap control interface is connected and working
112_steps:
113 0. Enter in snap runtime environment
114 .
115 $ snap run --shell wifi-connect.wifi-connect
116 .
117 1. List $SNAP_COMMON content
118 .
119 $ ls /var/snap/wifi-connect/common
120 .
121_verification:
122 Check that exists /var/snap/wifi-connect/common/control
123
124id: wifi-connect/configuration/set_AP_ssid_and_passphrase
125category_id: wifi-connect
126plugin: manual
127depends: wifi-connect/configuration/content_interface_is_plugged_after_reboot
128_summary: Verify it is possible changing wifi-ap access point ssid and passphrase params
129_steps:
130 0. Set wifi-ap AP ssid
131 .
132 $ wifi-connect ssid MYSSID
133 .
134 1. Set wifi-ap AP passphrase
135 .
136 $ wifi-connect passphrase MYPASSPHRASE
137 .
138 2. Display config
139 .
140 $ wifi-connect show-ap
141 .
142_verification:
143 Verify into returning values exist:
144 wifi.ssid: MYSSID
145 wifi.security-passphrase: MYPASSPHRASE
146
147id: wifi-connect/configuration/set_portal_password
148category_id: wifi-connect
149plugin: manual
150depends: wifi-connect/configuration/content_interface_is_plugged_after_reboot
151_summary: Verify portal password change
152_steps:
153 0. Set portal password
154 .
155 $ wifi-connect set-portal-password WHATEVER
156 .
157_verification:
158 Verify result of set-portal-password operation is a hash of 60 chars starting with '$2a$08$' string
159
160id: wifi-connect/connect/local_AP_is_up
161category_id: wifi-connect
162plugin: manual
163depends: wifi-connect/configuration/network_manager_controls_network_after_reboot
164_summary: Verify management portal is up, running and has got some ssids
165_steps:
166 0. From another device different from the one where wifi-connect is deployed:
167 .
168 Search available Wi-Fi access points
169 .
170_verification:
171 Check that an SSID is available named MYSSID (or the one set when configured). Verify you can
172 connect to that access point by introducing MYPASSPHRASE password
173
174id: wifi-connect/connect/can_connect_to_external_wifi
175category_id: wifi-connect
176plugin: manual
177depends: wifi-connect/connect/local_AP_is_up
178_summary: Management portal shows available access points and can connect to them
179_steps:
180 0. From another device different from the one where wifi-connect is deployed, once connected to local AP
181 .
182 Open browser and access http://10.0.60.1:8080
183 .
184_verification:
185 Verify a list of available external networks are shown. Verify you can access any of them by setting
186 the related passphrase and clicking connect button.
187 You should ssh device where wifi-connect is and see if 'nmcli d' command shows device is connected to
188 selected external Wi-Fi
189
190id: wifi-connect/connect/can_get_back_to_management_mode
191category_id: wifi-connect
192plugin: manual
193depends: wifi-connect/connect/can_connect_to_external_wifi
194_summary: It is possible to bring back local AP and management portal
195_steps:
196 0. From another device different from the one where wifi-connect is deployed, once connected to external Wi-Fi
197 .
198 Open browser and access http://<device_ip>:8080 (or http://<device_hostname>.local:8080 in case browser device supports avahi)
199 .
200_verification:
201 Check that a web is shown with a button to return back to management mode. Press button and after passed around a minute
202 verify same steps as the ones in id=wifi-connect/connect/can_connect_to_external_wifi
diff --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
0new file mode 100644203new file mode 100644
index 0000000..39c070e
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/wireless-tools/wireless-tools.pxu
@@ -0,0 +1,100 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
6
7unit: category
8id:wireless-tools
9_name: Wireless Tools
10
11id: wireless-tools/setup/ensure_interface_connection_setup
12category_id: wireless-tools
13_description: Ensure that wireless_tools interfaces are connected
14plugin: manual
15_steps:
16 1. Connect required wireless-tools slots/plugs
17 .
18 $ sudo snap connect wireless-tools:network-control :network-control
19 .
20_verification:
21 Verify that you see the following when running snap interfaces:
22 :network wireless-tools
23 :network-bind wireless-tools
24 :network-control wireless-tools
25
26id: wireless-tools/rfkill/list
27category_id:wireless-tools
28plugin: manual
29depends: wireless-tools/setup/ensure_interface_connection_setup
30_summary: The RF kill switches are listed
31_purpose: Check if all RF kill switches that are available on the HW are listed.
32_steps:
33 1. Execute the following command to retrieve the list of all RF kill switches:
34 .
35 $ /snap/bin/wireless-tools.rfkill list
36 .
37_verification:
38 Your expected RF kill switche(s) is/are shown in the output such as:
39 <id>: <name>: <description>
40 Soft blocked: <yes|no>
41 Hard blocked: <yes|no>
42 .
43 For example:
44 1: phy0: Wireless LAN
45 Soft blocked: no
46 Hard blocked: no
47 2: hci0: Bluetooth
48 Soft blocked: yes
49 Hard blocked: no
50
51id: wireless-tools/rfkill/change_state
52category_id:wireless-tools
53plugin: manual
54depends: wireless-tools/rfkill/list
55_summary: It is possible to change the state of RF kill
56_purpose: Check if it is possible to change a state of the RF kill switch
57_steps:
58 1. Execute the following commands first to list the available RF kill switches
59 .
60 $ /snap/bin/wireles-tools.rfkill list
61 .
62 2. Change the state of the selected RF kill switch using the id obtained in
63 the previous step. Note that the action: block or unblock shall be selected
64 based on the initial state of the RF kill switch: blocked yes or no.
65 .
66 $ /snap/bin/wireless-tools.rfkill [un]block <id>
67 .
68_verification:
69 There shall be no output on the standard output however there shall be a
70 change of state visible when listing the RF kill switches.
71 .
72 $ /snap/bin/wireless_tools.rfkill list
73 .
74
75id: wireless_tools/rfkill/capture_event
76category_id: wireless-tools
77plugin: manual
78depends: wireless-tools/rfkill/list
79_summary: It is possible to see the events related to RF kill switch(es)
80_purpose: Check if it is possible to capture the event notifications
81_steps:
82 1. Execute the following command to enter the capture-events mode
83 .
84 $ /snap/bin/wireless_tools.rfkill event
85 .
86 2. Change the state of the RF kill switch using a hardware button if
87 available.
88_verification:
89 The command executed in the step 1 shall block and display the current state
90 of the RF kill switches in a following form:
91 <timestamp>: idx <id> type <type id> op <op id> soft <0|1> hard <0|1>
92 Pressing the hardware RF kill switch should be printed in the following
93 form as in the above. For example:
94 1478774281.491635: idx 0 type 2 op 0 soft 0 hard 0
95 1478774281.491762: idx 1 type 1 op 0 soft 0 hard 0
96 1478774281.491776: idx 2 type 2 op 0 soft 1 hard 0
97 1478774301.905695: idx 2 type 2 op 2 soft 0 hard 0
98 1478774307.837112: idx 0 type 2 op 2 soft 1 hard 0
99 1478774310.817935: idx 2 type 2 op 2 soft 1 hard 0
100 1478774310.818989: idx 2 type 2 op 1 soft 1 hard 0
diff --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
0new file mode 100644101new file mode 100644
index 0000000..11d61b4
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/wpa-supplicant/00_general.pxu
@@ -0,0 +1,99 @@
1# Copyright 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Simon Fels <simon.fels@canonical.com>
6
7unit: category
8id: wpa_supplicant
9_name: wpa-supplicant
10
11id: wpa_supplicant/general/can_be_installed
12category_id: wpa_supplicant
13_description: Ensure that the wpa-supplicant snap can be installed
14plugin: manual
15_steps:
16 Install wpa-supplicant snap from the appropiate channel via the following command
17 .
18 $ snap install [--<channel>] wpa-supplicant
19 .
20 NOTE: Depending on which channel you want to test you need to select the right one.
21_verification:
22 The installation of the snap should finish with no errors.
23
24id: wpa_supplicant/general/slots_and_plugs_connected
25category_id: wpa_supplicant
26depends: wpa_supplicant/general/can_be_installed
27plugin: manual
28_summary: Verify that all plugs and slots of the snap are connected automatically.
29_steps:
30 1. Install the snap from the store:
31 .
32 $ snap wpa-supplicant
33 .
34_verification:
35 1. Verify that the 'wpa-supplicant' snap has all required plugs and slots connected
36 and you see a similar output like the example below. If any further plugs
37 from other snaps are shown for the same slot this can be safely ignored.
38 .
39 $ snap interfaces wpa-supplicant
40 Slot Plug
41 :network wpa-supplicant
42 :network-control wpa-supplicant
43 wpa-supplicant:legacy-service -
44 wpa-supplicant:service network-manager:wpa,wpa-supplicant:wpa
45
46id: wpa_supplicant/general/service_failed_to_start_without_reboot
47category_id: wpa_supplicant
48depends: wpa_supplicant/general/can_be_installed
49_description:
50 Verify that the wpa-supplicant can't be started after installation of the snap
51 without a system reboot.
52plugin: manual
53_steps:
54 Check service status with the following command
55 $ systemctl status snap.wpa-supplicant.wpa.service
56_verification:
57 Output should look like this:
58 .
59 * snap.wpa-supplicant.wpa.service - Service for snap application wpa-supplicant.wpa
60 Loaded: loaded (/etc/systemd/system/snap.wpa-supplicant.wpa.service; enabled; vendor preset: enabled)
61 Active: inactive (dead) (Result: exit-code) since Mon 2017-03-20 10:45:00 UTC; 5s ago
62 Process: 2645 ExecStart=/usr/bin/snap run wpa-supplicant.wpa (code=exited, status=255)
63 Main PID: 2645 (code=exited, status=255)
64
65id: wpa_supplicant/general/service_starts_after_reboot
66category_id: wpa_supplicant
67depends: wpa_supplicant/general/service_failed_to_start_without_reboot
68_description: Ensure that the wpa-supplicant service is up and running
69plugin: manual
70_steps:
71 1. Reboot the device
72 .
73 $ sudo reboot
74 .
75 2. When the device finished booting, check service status with the following command:
76 .
77 $ systemctl status snap.wpa-supplicant.wpa.service
78_verification:
79 Output should look like this:
80 .
81 * snap.wpa-supplicant.wpa.service - Service for snap application wpa-supplicant.wpa
82 Loaded: loaded (/etc/systemd/system/snap.wpa-supplicant.wpa.service; enabled; vendor preset: enabled)
83 Active: active (running) since Mon 2017-03-20 08:50:29 UTC; 1h 50min ago
84 Main PID: 1587 (wpa_supplicant)
85
86id: wpa_supplicant/general/system_has_a_single_wpa_running
87category_id: wpa_supplicant
88depends: wpa_supplicant/general/service_starts_after_reboot
89_description: Ensure that only a single wpa-supplicant instance runs on the system.
90plugin: manual
91_steps:
92 Check which wpa-supplicant processes are running via
93 .
94 $ pgrep wpa_supplicant
95_verification:
96 The output should list only a single process id, e.g.:
97 .
98 $ pgrep wpa_supplicant
99 2134
diff --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
0new file mode 100644100new file mode 100644
index 0000000..3b33e4c
--- /dev/null
+++ b/com.canonical.se:engineering-tests/units/wpa-supplicant/10_network_manager.pxu
@@ -0,0 +1,74 @@
1# Copyright 2017 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Simon Fels <simon.fels@canonical.com>
6
7id: wpa_supplicant/network_manager/wpa_plug_connected
8category_id: wpa_supplicant
9depends: wpa_supplicant/general/system_has_a_single_wpa_running
10_description:
11 Ensure that the necessary wpa plug of the network-manager snap is connected.
12plugin: manual
13_steps:
14 1. Install the NetworkManager snap from the store
15 .
16 $ snap install network-manager
17 .
18 2. List plug/slot connections for the wpa-supplicant snap
19 .
20 $ snap interfaces wpa-supplicant
21_verification:
22 Output should look like:
23 .
24 Slot Plug
25 [...]
26 wpa-supplicant:service network-manager:wpa
27
28id: wpa_supplicant/network_manager/finds_wifi_networks
29category_id: wpa_supplicant
30depends: wpa_supplicant/network_manager/wpa_plug_connected
31_description:
32 Verify WiFi networks can be found by using the wpa-supplicant and
33 network-manager snaps.
34plugin: manual
35_steps:
36 1. Trigger a scan for WiFi networks
37 .
38 $ nmcli d wifi rescan
39 .
40 2. List found WiFi networks
41 .
42 $ nmcli d wifi
43_verification:
44 The output should look similar to the following and should list available
45 WiFi networks in your environment:
46 .
47 * SSID MODE CHAN RATE SIGNAL BARS SECURITY
48 * test1 Infra 6 54 Mbit/s 85 **** WPA1 WPA2
49 test2 Infra 6 54 Mbit/s 45 ** WPA1 WPA2
50
51id: wpa_supplicant/network_manager/connect_secure_wifi_network
52category_id: wpa_supplicant
53depends: wpa_supplicant/network_manager/finds_wifi_networks
54_description:
55 Verify connecting one of the previously found WiFi networks is possible.
56 network-manager snaps.
57plugin: manual
58_steps:
59 Connect one of the previously found WiFi networks via:
60 .
61 $ nmcli d wifi connect <SSID> password <password>
62 .
63 Replace <SSID> and <password> with the right values for your selected WiFi
64 network.
65_verification:
66 The nmcli command call should return with no error. Verify why running
67 .
68 $ echo $?
69 0
70 .
71 Also verify that the WiFi network is connected:
72 .
73 $ nmcli d | grep wifi
74 wlan0 wifi connected test1
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 680dca7..32a332e 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,3 +1,4 @@
1<<<<<<< snapcraft.yaml
1name: easy-openvpn2name: easy-openvpn
2version: 2.3.10-23version: 2.3.10-2
3summary: An easy-to-manage OpenVPN deployment.4summary: An easy-to-manage OpenVPN deployment.
@@ -8,10 +9,22 @@ description: |
8 It is an open source project distributed under MIT License.9 It is an open source project distributed under MIT License.
9 See the project homepage for more details:10 See the project homepage for more details:
10 https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/easy-openvpn11 https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/easy-openvpn
12=======
13name: canonical-se-engineering-tests
14summary: Canonical System Enablement Engineering Test cases
15description: >
16 Various test cases the System Enablement team at Canonical
17 executes before a snap is allowed to enter the store and
18 be used by any user.
19 The source code is available for reference and contribution at
20 https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests
21version: 6
22>>>>>>> snapcraft.yaml
11confinement: strict23confinement: strict
12grade: stable24grade: stable
1325
14apps:26apps:
27<<<<<<< snapcraft.yaml
15 easy-openvpn:28 easy-openvpn:
16 command: bin/ovpn_run29 command: bin/ovpn_run
17 daemon: simple30 daemon: simple
@@ -97,3 +110,70 @@ parts:
97 - -run-tests.sh110 - -run-tests.sh
98 - -spread111 - -spread
99112
113=======
114 plainbox:
115 command: bin/plainbox-wrapper
116 run:
117 command: bin/run-tests
118 bluez:
119 command: bin/run-bluez-tests
120 network-manager:
121 command: bin/run-network-manager-tests
122 modem-manager:
123 command: bin/run-modem-manager-tests
124 tpm:
125 command: bin/run-tpm-tests
126 wifi-ap:
127 command: bin/run-wifi-ap-tests
128 wifi-connect:
129 command: bin/run-wifi-connect-tests
130 wireless-tools:
131 command: bin/run-wireless-tools-tests
132 pulseaudio:
133 command: bin/run-pulseaudio-tests
134 snapweb:
135 command: bin/run-snapweb-tests
136 upower:
137 command: bin/run-upower-tests
138 udisks2:
139 command: bin/run-udisks2-tests
140 alsa-utils:
141 command: bin/run-alsa-utils-tests
142 media-hub:
143 command: bin/run-media-hub-tests
144 captive-redirect:
145 command: bin/run-captive-redirect-tests
146 wpa-supplicant:
147 command: bin/run-wpa-supplicant-tests
148 serial-vault:
149 command: bin/run-serial-vault-tests
150 easy-openvpn:
151 command: bin/run-easy-openvpn-tests
152
153parts:
154 common:
155 plugin: dump
156 source: .
157 prime:
158 - COPYING
159 plainbox-local:
160 plugin: python
161 python-packages:
162 - plainbox
163 - requests-oauthlib
164 - xlsxwriter
165 build-packages:
166 - libxml2-dev
167 - libxslt1-dev
168 - zlib1g-dev
169 - build-essential
170 engineering-provider:
171 plugin: plainbox-provider
172 source: ./com.canonical.se:engineering-tests
173 after: [plainbox-local]
174 launchers:
175 plugin: dump
176 source: .
177 prime:
178 - bin/
179>>>>>>> snapcraft.yaml

Subscribers

People subscribed via source and target branches

to all changes: