11465 Commits

Author SHA1 Message Date
Michael Vogt
4a2e84a3c3 Merge pull request #11798 from pedronis/info-snapd_asserts_formats
asserts/info,mkversion.sh: capture max assertion formats in snapd/info
2022-05-18 16:26:06 +02:00
Pawel Stolowski
96ef1f69cc Merge pull request #11756 from stolowski/test-connections-after-failed-refresh
tests: add spread test to verify that connections are preserved if snap refresh fails
2022-05-18 11:58:50 +02:00
Sergio Cazzolato
5a2feb9f2d Fix auto-refresh-gating test forcing reset-failed before restart (#11793)
This is to avoid issue start-limit-hit:

● snapd.socket - Socket activation for snappy daemon
Loaded: loaded (/usr/lib/systemd/system/snapd.socket; enabled; vendor
preset: disabled)
Active: failed (Result: start-limit-hit) since Mon 2022-05-16
16:23:46 UTC; 11min ago
   Listen: /run/snapd.socket (Stream)
           /run/snapd-snap.socket (Stream)

May 16 16:23:46 may161603-595563 systemd[1]: Starting Socket activation
for snappy daemon.
May 16 16:23:46 may161603-595563 systemd[1]: Listening on Socket
activation for snappy daemon.
May 16 16:23:46 may161603-595563 systemd[1]: snapd.socket: Start request
repeated too quickly.
May 16 16:23:46 may161603-595563 systemd[1]: snapd.socket: Failed with
result 'start-limit-hit'.
May 16 16:23:46 may161603-595563 systemd[1]: Failed to listen on Socket
activation for snappy daemon.
2022-05-17 17:07:18 -03:00
Samuele Pedroni
faa8cb3d82 tests: spread test the changes to snapd/info 2022-05-17 21:24:14 +02:00
Sergio Cazzolato
73a1dca7c2 Check the reboot is comming by using journal-state match-log (#11791)
Instead of iterate doing match-log, the idea is to using the attributed
-n and --wait as we do with retry tool
2022-05-17 13:12:45 -03:00
Paweł Stołowski
51acf6838f Tweak the checks. 2022-05-17 16:16:42 +02:00
Paweł Stołowski
d5e12ca48a Be explicit about expected install/try error. 2022-05-17 13:27:18 +02:00
Paweł Stołowski
cfdf28ba9c Add spread test to verify that connections are preserved if snap refresh
fails.
2022-05-17 13:27:18 +02:00
Maciej Borzecki
669e7e86c8 Merge pull request #11774 from mardy/mount-interface-fixes
i/b/mount_control: add an optional "/" to the mount target rule
2022-05-17 11:55:33 +02:00
Michael Vogt
d1f1e1f25e Merge pull request #11771 from stolowski/core20-preseed/spread-test
tests: spread test for uc20 preseeding covering snap prepare-image
2022-05-16 15:47:13 +02:00
Sergio Cazzolato
ddfc54bd59 tests: use new snaps.name and snaps.cleanup tools (#11599)
* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 872b64e05b..1a986df8d5

1a986df8d5 Merge pull request #17 from snapcore/new-snaps-cleanup-tool
29600af53a Fixing os.paths test for arch linux
e5cdb06053 Minor fixes based on comment reviews
89a0073b88 Run cleanup tests just on systems with snapd pre-installed
19d216a1b9 New tools to get os paths, snap names and cleanup the snaps
a36ee8451a Merge pull request #16 from snapcore/add-codespell
f837691b62 Adding codespell tool to github workflow
58418c3f7e Merge pull request #15 from snapcore/testing-jammy
f015a34899 Fix issue about how info is saved for Debug output
1ee4240e79 Adding jammy to the test systems in spread.yaml
61a4c3142d Merge pull request #14 from snapcore/include-support-s390x
3a1a65f6e1 Update the comments about shellchek
5ddfb7e1db New support for s390x arch in os.query tool
575f5d2016 Merge pull request #13 from snapcore/new-utils-section
4701612434 avoid installing and removing snapd in ubuntu focal
4d0317633d shellcheck in xenial is not needed
d95cb2e627 Moving some tools to the new utils section
839a0ce808 Merge pull request #10 from snapcore/new-spread-shellcheck-tool
5d5efd6fbe Merge pull request #12 from snapcore/run-shellchek-in-old-version
497b7d691f Force testing shellchek with versions 0.8 and 0.7
b3cb5a5a0a Update the copyright
5cfa7cb84d New shellcheck for spread tasks

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 1a986df8d5e66459ec9aa2498a1e9c7d7e419284

* Using new snaps.name and snaps.cleanup tools

These tools are imported from snapd-testing-tools

* cleanup tool will not be in bin

* Fix shellcheck

* Update missing tests

* Fix shellcheck

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 1a986df8d5..53ca1b3b70

53ca1b3b70 Merge pull request #21 from snapcore/fix-some-shellcheks
d380a8065e Fix shellchecks
ad410d44cd Merge pull request #20 from snapcore/fixes-on-remote-tools
80bfd6d85b Updates based on review comments in snapd project
5c77d93bd6 Merge pull request #18 from snapcore/tests-new-remote-tools
3cef4b69b4 Updating timeouts
2c6bf4bd48 Using local vars and removing wait-for tool
8642893803 Test fixes
a14ec4ea88 New remote tools
4545a5e5be Merge branch 'main' into tests-new-remote-tools
a791ae89cb New remote tools

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 53ca1b3b709e685b7910e4b559f182dd78039029

* Make snaps.name executable
2022-05-13 15:11:54 -03:00
Paweł Stołowski
c753924283 Add debug section. 2022-05-13 16:20:04 +02:00
Paweł Stołowski
a35df14d90 Only run the test on 20.04 due to libc issue when running new build of
snapd against old core20-chroot when preseeding.
2022-05-13 16:05:31 +02:00
Sergio Cazzolato
e951dc2407 Merge pull request #11652 from sergiocazzolato/tests-update-snapd-testing-tools-2
tests: update snapd testing tools
2022-05-12 22:53:54 -03:00
Sergio Cazzolato
b5a3ead145 Merge commit '0643949ebe2318ed7608896fb1e820dc4f5e459b' into tests-update-snapd-testing-tools-2 2022-05-12 15:37:19 -03:00
Maciej Borzecki
00f3183286 tests/main/searching: tweak the output check
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-05-12 09:02:05 +02:00
Paweł Stołowski
83419c96ef preseed.sh is not needed, drop. 2022-05-11 16:56:12 +02:00
Sergio Cazzolato
25bb7667f6 Remove os.paths test because it is included in snapd-testing-tools now 2022-05-11 08:54:49 -03:00
Pawel Stolowski
848d5bb537 Remove unneeded match.
Co-authored-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2022-05-11 11:27:21 +02:00
Pawel Stolowski
0c73e443e3 Typo fix
Co-authored-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2022-05-11 11:27:06 +02:00
Paweł Stołowski
a8298e7b1a Fix shellcheck error. 2022-05-11 10:19:26 +02:00
Paweł Stołowski
84e66c8f5c Check that there are no umount errors from cleanup. 2022-05-11 10:01:13 +02:00
Paweł Stołowski
fd5656523c Sign the model upfront and keep it in the repo. 2022-05-11 09:38:39 +02:00
Maciej Borzecki
dc6b59c5bc tests/main/searching: update the test to verify search with aggregate terms
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-05-11 09:10:09 +02:00
Alberto Mardegan
a10ecaaaaf i/b/mount_control: add an optional "/" to the mount target rule
AppArmor is very strict when it comes to specifying the target of a
mount rule: when the mount refers to a directory, the target *must* end
with a "/", or AppArmor will block the operation. We did not catch this
in our tests because we have always been ending our "where" attributes
with a "**", that also matches slashes.

So, we update the rule to allow for an optional "/" at the end of the
mount target specification; note that our regular expression for the
validation of the mount target attribute is written in such a way that
an ending slash is not allowed. For the time being this seems proper,
because we don't want to expose this subtlety to the developer.
2022-05-11 09:40:49 +03:00