Skip to content

Commit

Permalink
tests: add details to more spread tests
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Pires <[email protected]>
  • Loading branch information
MiguelPires committed May 3, 2024
1 parent 8ba6f57 commit e3a8576
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 2 deletions.
10 changes: 10 additions & 0 deletions tests/main/hidden-snap-dir/task.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 4 additions & 0 deletions tests/main/install-cache/task.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 5 additions & 1 deletion tests/main/install-errors/task.yaml
Original file line number Diff line number Diff line change
@@ -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-*]

Expand Down
4 changes: 4 additions & 0 deletions tests/main/install-hook-misbehaving/task.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
5 changes: 5 additions & 0 deletions tests/main/install-refresh-remove-hooks/task.yaml
Original file line number Diff line number Diff line change
@@ -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]

Expand Down
6 changes: 6 additions & 0 deletions tests/main/install-remove-multi/task.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 6 additions & 1 deletion tests/main/install-sideload-epochs/task.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions tests/main/install-store/task.yaml
Original file line number Diff line number Diff line change
@@ -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*]

Expand Down

0 comments on commit e3a8576

Please sign in to comment.