From e3a857689fb9f23bda66d7a6b8291f3f00a5a804 Mon Sep 17 00:00:00 2001 From: Miguel Pires Date: Thu, 2 May 2024 16:41:15 +0100 Subject: [PATCH] tests: add details to more spread tests Signed-off-by: Miguel Pires --- tests/main/hidden-snap-dir/task.yaml | 10 ++++++++++ tests/main/install-cache/task.yaml | 4 ++++ tests/main/install-errors/task.yaml | 6 +++++- tests/main/install-hook-misbehaving/task.yaml | 4 ++++ tests/main/install-refresh-remove-hooks/task.yaml | 5 +++++ tests/main/install-remove-multi/task.yaml | 6 ++++++ tests/main/install-sideload-epochs/task.yaml | 7 ++++++- tests/main/install-store/task.yaml | 5 +++++ 8 files changed, 45 insertions(+), 2 deletions(-) diff --git a/tests/main/hidden-snap-dir/task.yaml b/tests/main/hidden-snap-dir/task.yaml index 1373e186557..693cd3f3f16 100644 --- a/tests/main/hidden-snap-dir/task.yaml +++ b/tests/main/hidden-snap-dir/task.yaml @@ -1,5 +1,15 @@ summary: Check that the experimental hidden dir feature migrates the dir +details: | + Check that enabling the experimental hidden-snap-folder feature migrates + snap data directories and corresponding environment variables from ~/snap + to ~/.snap/data during the next refresh. Verify that taking a snapshot + before the migration and restoring it afterwards still restores the data. + Check that the migration is reverted if the feature is unset. + NOTE: there is a significant commented-out portion of this test related to + the introduction of a ~/Snap directory for user-facing data. The plans for + it were put on hold and is unclear when/if they'll be restored. + environment: NAME: test-snapd-tools diff --git a/tests/main/install-cache/task.yaml b/tests/main/install-cache/task.yaml index 735c71c1a4d..f3857271cea 100644 --- a/tests/main/install-cache/task.yaml +++ b/tests/main/install-cache/task.yaml @@ -1,5 +1,9 @@ summary: Check that download caching works +details: | + Check that snap downloads are cached such that repeated installs don't + fetch the same snap from the store. + environment: # on core systems, the test was seen to misbehave when memory limit is set SNAPD_NO_MEMORY_LIMIT: 1 diff --git a/tests/main/install-errors/task.yaml b/tests/main/install-errors/task.yaml index 13982e714dd..b219856980b 100644 --- a/tests/main/install-errors/task.yaml +++ b/tests/main/install-errors/task.yaml @@ -1,4 +1,8 @@ -summary: Checks for cli errors installing snaps +summary: Check for cli errors installing snaps + +details: | + Check error messages and exit codes returned by various failing snap + commands (e.g., unauthenticated installs, unknown snap names, etc). systems: [-ubuntu-core-*] diff --git a/tests/main/install-hook-misbehaving/task.yaml b/tests/main/install-hook-misbehaving/task.yaml index 9afdb621685..ef24c4391d3 100644 --- a/tests/main/install-hook-misbehaving/task.yaml +++ b/tests/main/install-hook-misbehaving/task.yaml @@ -1,5 +1,9 @@ summary: Check that the output of noisy install hook is truncated. +details: | + Check that the long output of a failed install hook is truncated from the + `snap change` output. + execute: | if snap try "$TESTSLIB"/snaps/snap-hooks-bad-install; then echo "Expected snap try to fail" diff --git a/tests/main/install-refresh-remove-hooks/task.yaml b/tests/main/install-refresh-remove-hooks/task.yaml index ad1fc5d558c..24912ef5d72 100644 --- a/tests/main/install-refresh-remove-hooks/task.yaml +++ b/tests/main/install-refresh-remove-hooks/task.yaml @@ -1,5 +1,10 @@ summary: Check install, configure, remove and pre-refresh/post-refresh hooks. +details: | + Check that the various snap hooks are called at the right times (e.g., + refresh hooks are only called on refresh, the install hook is only called + on initial install, etc). + # slow in autopkgtest (>1m) backends: [-autopkgtest] diff --git a/tests/main/install-remove-multi/task.yaml b/tests/main/install-remove-multi/task.yaml index b5a87f24168..2752ae62000 100644 --- a/tests/main/install-remove-multi/task.yaml +++ b/tests/main/install-remove-multi/task.yaml @@ -1,5 +1,11 @@ summary: Check that install/remove of multiple snaps works +details: | + Check that installing multiple snaps and removing them with and without + `--purge` results in snapshots being saved or not, accordingly. Check that + installing a snap with a desktop file creates a corresponding desktop file + and that it's deleted once the snap is removed. + execute: | echo "Install multiple snaps from the store" snap install test-snapd-sh test-snapd-control-consumer diff --git a/tests/main/install-sideload-epochs/task.yaml b/tests/main/install-sideload-epochs/task.yaml index 0f83d4337b8..c70c2dda5c7 100644 --- a/tests/main/install-sideload-epochs/task.yaml +++ b/tests/main/install-sideload-epochs/task.yaml @@ -1,4 +1,9 @@ -summary: Checks for snap sideload install w/mismatched epochs +summary: Checks for snap sideload install w/ mismatched epochs + +details: | + Check that updating a snap via a sideload install fails if snapd can't read + the previous version's epoch. This ensures that an update can't result in + the snap not being able to read previous version's data. environment: # Ensure that running purely from the deb (without re-exec) works diff --git a/tests/main/install-store/task.yaml b/tests/main/install-store/task.yaml index 20f0a3e21b7..6483e597b06 100644 --- a/tests/main/install-store/task.yaml +++ b/tests/main/install-store/task.yaml @@ -1,5 +1,10 @@ summary: Checks for special cases of snap install from the store +details: | + Test that installing from different channels, installing non-devmode snaps + with devmode and vice-versa and installing snaps with bash-completion + scripts all work as expected. + # run on ubuntu-14,16,18,20+ but not on ubuntu-core, fedora etc systems: [ubuntu-1*, ubuntu-2*, ubuntu-3*]