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
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>
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>
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.
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
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.
There is no way to have "no" confinement as many backends are used
at all times. The names should reflect this.
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>