Skip to content

Commit

Permalink
tests: add core20 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Dec 18, 2019
1 parent 6a6494f commit 747d06a
Show file tree
Hide file tree
Showing 4 changed files with 287 additions and 95 deletions.
22 changes: 22 additions & 0 deletions spread.yaml
Expand Up @@ -76,6 +76,9 @@ backends:
- ubuntu-core-18-64:
image: ubuntu-16.04-64
workers: 6
- ubuntu-core-20-64:
image: ubuntu-16.04-64
workers: 6

- debian-9-64:
workers: 6
Expand Down Expand Up @@ -168,6 +171,10 @@ backends:
image: ubuntu-16.04-64
username: ubuntu
password: ubuntu
- ubuntu-core-20-64:
image: ubuntu-16.04-64
username: ubuntu
password: ubuntu
- ubuntu-17.10-64:
username: ubuntu
password: ubuntu
Expand Down Expand Up @@ -628,6 +635,8 @@ suites:
# These tests are executed on all other plattforms as they
# are designed to run on pristine systems
tests/smoke/:
# TODO:UC20: enable for uc20
systems: [-ubuntu-core-20-*]
summary: Essential system level tests for snapd
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
Expand All @@ -639,6 +648,8 @@ suites:
"$TESTSLIB"/prepare-restore.sh --restore-suite
# All other tests run now and will heavily modify the system.
tests/main/:
# TODO:UC20: enable for uc20
systems: [-ubuntu-core-20-*]
summary: Full-system tests for snapd
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
Expand All @@ -664,6 +675,17 @@ suites:
"$TESTSLIB"/prepare-restore.sh --restore-suite-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-suite
tests/core20/:
summary: Subset of core20 specific tests
systems: [ubuntu-core-20-*]
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
prepare-each: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite-each
restore-each: |
"$TESTSLIB"/prepare-restore.sh --restore-suite-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-suite
tests/completion/:
summary: completion tests
# ppc64el disabled because of https://bugs.launchpad.net/snappy/+bug/1655594
Expand Down
26 changes: 26 additions & 0 deletions tests/core20/basic/task.yaml
@@ -0,0 +1,26 @@
summary: Check basic core20 system functionality

execute: |
echo "Check that the system snaps are there"
snap list | MATCH core20
snap list | MATCH snapd
if snap list | grep '^core +'; then
echo "The old core snap is installed but should not"
exit 1
fi
echo "Ensure that the system is fully seeded"
snap changes | MATCH "Done.*Initialize system state"
echo "Check that a simple shell snap"
# TODO:UC20: add test-snapd-sh-core20
snap install test-snapd-sh-core18
test-snapd-sh-core18.sh -c 'echo hello' | MATCH hello
if python3 -m json.tool < /var/lib/snapd/system-key | grep '"build-id": ""'; then
echo "The build-id of snapd must not be empty."
exit 1
fi
echo "Ensure passwd/group is available for snaps"
test-snapd-sh-core18.sh -c 'cat /var/lib/extrausers/passwd' | MATCH test
46 changes: 46 additions & 0 deletions tests/lib/assertions/ubuntu-core-20-amd64.model
@@ -0,0 +1,46 @@
type: model
authority-id: vxj7EkYOlg15uAHRswTXIUpzWqO2sTBi
series: 16
brand-id: vxj7EkYOlg15uAHRswTXIUpzWqO2sTBi
model: ubuntu-core-20-mvo-amd64
architecture: amd64
base: core20
grade: dangerous
snaps:
-
default-channel: 20/edge
id: UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH
name: pc
track: 20
type: gadget
-
default-channel: latest/edge
id: DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q
name: core20
track: latest
type: base
-
default-channel: 20/edge
id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza
name: pc-kernel
track: 20
type: kernel
-
default-channel: latest/edge
id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4
name: snapd
track: latest
type: snapd
timestamp: 2019-08-26T00:00:00.0Z
sign-key-sha3-384: 2XxnFfNz1CCA6OZ5v03QjbFaK_A6-FjnNzNYJSMhSm_RC77iriSBh9X_olPNmupv

AcLBcwQAAQoAHRYhBNPJP7iUC6HvARf0BQG87hgg441ZBQJdwpNWAAoJEAG87hgg441ZjKIP/ie8
TaRMRg72onq8q3xyPqfzBALIkvZV0rN3QNc+CvASMrA5a1K/Tf2LHIjDLNq4SK49yMlehIsB8uVy
oczPX2eO2cIaxc/LGDVlTOmVY4q2+J0z18ZMEs7UysGq/B+p6r0Bdv409R92fciaYCt0dfCCUyBG
bO8L8/FDMBNsKY944UxVD3IU5F96jwSU7Zv6M5fzIZLrlElM0MOHLmtG6Qwxc7WfOAXIb3IEGiGz
Y4hgEyPA8F+Z4HEUYSbQaZ2L0Mh4G5ssIP3W6BGN0uKe+VtrfUZerEoKQCqZk34+INNmPCzVxHmp
VDKsGS3gDyTJUgkzOa84FH2PYq6t79mBNnqV8WWZIP4tJtf9zyUlptagf1mIbt/2EVNpxxHYhACb
jxNWoDPgkKsSiAPEpLTztgXlzxhWtirAIgEk+8v/lxSsbPNlZM5yYA57CKh5s/TfK3Mc4oer9/iD
NTAhmxDpl6MSgKojoJFGhADrmTFs+LZqMhclIrcq9Qm7bNEIpGHFRDxQd6CQc1B/zgEUzkRfAgpl
440+Z9Vwcd26SdlMhk5C4Oxp4jE+4cAROjxoT7VIxrnqbcYk9oBrfGL8WW5hsYs/qBqVulbesThk
/pWXzxpIubZT7fdFLHx2dwEIfwLoPcGm3gAbzdVNTFYNCWGHxd4kevGxIPnT4EYqWiksOHoh

0 comments on commit 747d06a

Please sign in to comment.