Skip to content

Commit

Permalink
tests: fix tests checks and add missing details in spread tests - par…
Browse files Browse the repository at this point in the history
…t 1 (canonical#13384)

* tests: add missing details to tests part 1

Add details to tests. This is part of the documentation plan.

* fix error checking tests format
  • Loading branch information
sergiocazzolato authored Nov 24, 2023
1 parent a4b5282 commit c1f9092
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 1 deletion.
3 changes: 2 additions & 1 deletion run-checks
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ if [ "$STATIC" = 1 ]; then

echo "Checking tests formatting"
if [ -n "$FILTERED_TESTS" ]; then
./tests/lib/external/snapd-testing-tools/utils/check-test-format --tests "$FILTERED_TESTS"
# shellcheck disable=SC2086
./tests/lib/external/snapd-testing-tools/utils/check-test-format --tests $FILTERED_TESTS
fi
fi

Expand Down
3 changes: 3 additions & 0 deletions tests/main/ack/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
summary: Check snap ack

details: |
Verify the basic scenarios for the snap ack command
systems: [-ubuntu-core-*-arm-*]

execute: |
Expand Down
3 changes: 3 additions & 0 deletions tests/main/alias/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
summary: Check snap alias and snap unalias

details: |
Verify the basic scenarios for the snap alias, unalias and aliases commands.
prepare: |
"$TESTSTOOLS"/snaps-state install-local aliases
Expand Down
3 changes: 3 additions & 0 deletions tests/main/api-get-systems-label/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
summary: verify that the /systems/<label> api works

details: |
Verify the basic functionality for the /systems/<label> API
systems:
# TODO: also test classic/core hybrid systems once they are ready
- ubuntu-core-2*
Expand Down
4 changes: 4 additions & 0 deletions tests/main/appstream-id/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
summary: Verify AppStream ID integration

details: |
Verify the AppStream ID is included in the search API response and also validate
that the AppStream ID is included in the installed snaps and apps API response.
# ubuntu-core: no curl
# ubuntu-14.04: curl too old, missing --unix-socket
systems: [-ubuntu-14.04-*, -ubuntu-core*]
Expand Down
4 changes: 4 additions & 0 deletions tests/main/apt-hooks/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
summary: Ensure apt hooks work

details: |
Verify the snap catalog is stored locally and apt command shows a
message to install the snap with the same name of the requested deb
# apt hook only available on 18.04+ and aws-cli only for amd64
systems: [ubuntu-18.04-64, ubuntu-2*-64]

Expand Down
3 changes: 3 additions & 0 deletions tests/main/aspects/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
summary: Check the aspects API

details: |
Verify the basic scenarios of the aspects API
# ubuntu-14.04-64's curl doesn't support --unix-socket
systems: [-ubuntu-14.04-*]

Expand Down
5 changes: 5 additions & 0 deletions tests/main/auth-errors/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
summary: Check that the authentication errors are properly reported.

details: |
Verify that in ubuntu core just authenticated users are allowed to
install snaps ans to connect interfaces. Also validate the error
messages are the expected.
systems: [-ubuntu-core-*]

prepare: |
Expand Down

0 comments on commit c1f9092

Please sign in to comment.