14 Commits

Author SHA1 Message Date
Miguel Pires
8ab439b5b4 tests: add details to more spread tests (#13937)
Document more spread tests in detail.

Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
2024-05-03 11:12:00 -03:00
Sergio Cazzolato
32454bd4ed Add rule for tcp to block dns queries (#12648)
This is needed because in fedora 37 dns queries are using tcp instead of
udp.

Reading documentation I see both protocols could be used in different
situations.

The idea is to make sure the dns queries are blocked to check the snap
network errors.
2023-03-16 09:31:29 -03:00
Sergio Cazzolato
c7704c6619 Improve and standarize debug section on tests
The idea of this change is to standarize the debug section of the tests
and also to make them more robust.

Debug is shown when the test has failed, so the preconditions for this
step are undefined, this is why we need to suppose it can fail at any
step.

In case the debug section fails for a test, then the generic debug is
not displayed and no usefull debug information is shown to understand
the problem.
2022-08-30 09:17:53 -03:00
Sergio Cazzolato
6d4872be01 tests: fix snap-network-erros on uc16
* Fix snap-network-erros on uc16

The test is failing in uc 16 with error:

+ systemd-resolve --flush-caches
systemd-resolve: unrecognized option '--flush-caches'

Also the test is simplified to support all the systems

* fix sheelcheck
2022-07-04 11:25:13 +02:00
Ian Johnson
44ce56e72c tests/main/snap-network-errors: skip flushing dns cache on centos-7
Centos 7 doesn't seem to have any local DNS caching, so just skip the part of
the test that flushes the cache.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-01-19 06:42:30 -06:00
Sergio Cazzolato
7e906450da tests: testing new fedora 33 image (#9556)
* Testing new fedora 33 image

* packaging/fedora: align with Fedora source tree

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* Skip tests on f33 due to it uses cgroupv2

* data/selinux: account for s-c unmounting things

The snap-confine helper unmounts some locations which are actually a tmpfs with
a different label. Update the policy to allow that.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* tests/main: Fedora 33 nsswitch uses resolved first for host resolution

Make sure that we also stop or flush resolved caches when disabling blocking DNS
or clearing resolve.conf.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* tests/main/snap-network-errors: tweak to account for older systemd versions

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

* spread: Fedora 31 is EOL on 24.11

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>

Co-authored-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-11-18 23:28:00 -03:00
Michael Vogt
525516928b tests: disable snap-network-errors on core20, there is no iptables there 2020-01-09 13:30:34 +01:00
Pawel Stolowski
de50198355 Don't use iptables save/restore. 2018-12-05 10:22:51 +01:00
Pawel Stolowski
c51264d4e4 Tweaks. 2018-12-05 09:55:43 +01:00
Pawel Stolowski
8d70221ce2 Restore iptables in the test. 2018-12-04 16:18:46 +01:00
Pawel Stolowski
d40cbb5ffc Removed iptables cleanup rule from the test - rely on restore. 2018-11-30 09:34:15 +01:00
Pawel Stolowski
323bcab762 Do snap refresh to avoid unexpected dev auth refresh on snap find. 2018-11-29 11:56:02 +01:00
Pawel Stolowski
38f4fab8d5 Spread test tweaks (thanks Maciej). 2018-11-28 11:30:50 +01:00
Pawel Stolowski
02c2d96a19 Handle dns error. 2018-11-27 16:27:37 +01:00