40 Commits

Author SHA1 Message Date
Zygmunt Bazyli Krynicki
6da6dd1472 tests: document or tweak documentation of interface tests (#13896)
* tests: fix typo: case

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-audio-playback-record

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-avahi-observe

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-cli

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-content-circular

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-content-empty-content-attr

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-cups-control-autoconect

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-cups-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-content-mkdir-writable

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-custom-device-app-slot

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-desktop-document-portal

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-firewall-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-fuse-support

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests: fix typo: default

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-hardware-observe

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-hardware-random-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-hardware-random-observe

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-home

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-hooks

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-hooks-plug-with-number

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-kernel-module-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-libvirt

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-locale-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-location-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-log-observe

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-mount-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: rewrite documentation of interfaces-mount-observe

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-netlink-connector

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-network

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: rewrite documentation of interfaces-network-bind

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-network-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-network-manager

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat and tweak details of interfaces-network-status

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-packagekit-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-password-manager-service

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-personal-files

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: rewrite details of interfaces-polkit

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-pulseaudio

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-snapd-control

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-snapd-control-with-manage

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-system-observe

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: reformat details of interfaces-upower-observe

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document interfaces-wayland

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document known

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document known-remote

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests: correct the summary for known-remote test

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests: fix typo: bound

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document install-local-w-metadata

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

* tests/main: document login

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

---------

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
2024-04-26 15:10:48 +02:00
Valentin David
7b5d001b10 tests: Enable more tests for UC22 2022-04-06 15:10:05 +02:00
Sergio Cazzolato
464050fa15 Replace "not MATCH" by NOMATCH in tests 2021-06-10 09:02:50 -03:00
Sergio Cazzolato
9087d184db Update layout for tests - part 1
The change updates the layout of the tests following a proposed order
which should make the test easier to read and understand

The proposed order is:

summary
details

backends
systems

manual
priority
warn-timout
kill-timeout

environment
prepare
restore
debug
execute
2021-04-08 15:05:29 -03:00
Sergio Cazzolato
ad6f356d20 Update documentation and checks for interfaces tests
This change adds extra self documentation and improbe organization and
checks for interfaces tests.
2021-03-09 15:49:02 -03:00
Maciej Borzecki
84aac46c55 tests: fix use of MATCH -v
MATCH is a wrapper around grep -E -q, thus MATCH -v ends up being grep -E -q -v.
However, grep -v is peculiar as far as exit codes are concerned, and returns 0
when lines not matching the pattern were found in the input.

For example, this command returns 1:

$ cat <<EOF | grep -E -v foo
foo
foo
foo
EOF

but this one returns 0, even though the pattern we don't want is in the input:

cat <<EOF | grep -E -v foo; echo $?
foo
bar
baz
EOF

In the tests, MATCH -v is used to check that the pattern does not appear in the
input, which is incorrect.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2019-12-17 12:11:57 +01:00
Sergio Cazzolato
9aaaa933ec Remove PWD use and normalize interfaces tests 2019-01-22 18:18:15 -03:00
Sergio Cazzolato
50c7e1a92e Auto-clean the test directory 2019-01-14 23:42:55 -03:00
Maciej Borzecki
d356f9a33b tests: fix tests to not assume a permissive umask
When default umask is strict, eg. 0077, the
/home/gopath/src/github.com/snapcore/snapd hierarchy will have 0700 permissions,
meaning attempts to write to a place under that path as a `test` user will fail.
This has come up with Fedora 29 where the default umask was changed to a more
strict one.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-12-06 08:48:25 +01:00
Maciej Borzecki
92438dbda7 tests: update tests for CentOS 7
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-11-19 13:09:58 +01:00
Maciej Borzecki
c4248d32c3 spread, tests: add support for Amazon Linux 2
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-07-24 13:13:48 +02:00
Maciej Borzecki
d3bc0fcf8f tests: make the match pattern for unconnected interface more specific
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-06-20 07:47:01 +02:00
Maciej Borzecki
e0592c22a3 tests: drop unnecessary "${PWD}" in touched tests
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-06-19 15:39:40 +02:00
Maciej Borzecki
ef0915c7fc tests/main/interfaces-kernel-module-control: fix restore
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-06-19 11:48:42 +02:00
Maciej Borzecki
e5affe0d85 tests: shellchecks part 4
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-06-18 15:32:02 +02:00
sergio-j-cazzolato
90c6f913fa Checking interfaces declaring the specific interface
This is done in the tests which are checking the interfaces information
in order to make them more robusts, making the test independent of other
plug:slots declared such it is happening in gadgets.
2018-04-24 08:59:15 -03:00
Maciej Borzecki
3f11421862 tests/main/interfaces-kernel-module-control: disable on Arch
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-04-05 12:29:20 +02:00
sergio-j-cazzolato
55b8af4371 Merge branch 'master' into tests-update-interfaces-tests 2018-03-22 14:39:21 -03:00
Michael Vogt
06bb3528b1 tests: update tests to deal with s390x quirks
The s390x system is different in some ways so exclude two more
tests from the autopkgtest runs.
2018-03-21 10:17:46 +01:00
sergio-j-cazzolato
c2736f2ce7 Minor fixes adding comments and a dependecy for bionic 2018-03-19 08:45:06 -03:00
sergio-j-cazzolato
221f83d771 skipping test when the kernel is not available in the system 2018-03-17 00:25:14 -03:00
sergio-j-cazzolato
4e5f5f20e2 Change kernel module for interfaces-kernel-module-control
This is because in bionic the minix module is not available.
2018-03-16 22:52:17 -03:00
sergio-j-cazzolato
20c8ab9e1c Update interface tests to remove extra checks and normalize tests
This change includes:
. Remove all the checks that are done after a connection and
disconnection (this is already checked as part of the snap_connect and
snap_disconnect tests).
. install_local function used to pack and install local snaps
. Remove not needed echo
. Change the check of interfaces default behaviour for the
autoconnection to support the scenario when there are other snaps also
connected to the interface (that happens when testing caracalla gadget)
. Add new lines between task tags
2018-02-22 11:30:19 -03:00
Michael Vogt
f366f32c42 tests: add basic lxd test (#3372)
This adds a test to ensure that the basic lxd functionality is available. It covers that lxd as a snap is functional and that snaps inside an lxd container can be used.
2017-08-29 15:35:41 -03:00
Simon Fels
4ee0003828 tests: enable main suite on fedora (#3505) 2017-07-24 14:36:42 -03:00