Files
snapd/tests/lib/assertions/developer1-20-secured.model
Ian Johnson 61b7613532 tests/nested, fakestore: changes necessary to run nested uc20 signed/secured tests (#9333)
* tests/lib/nested.sh: allow using custom model for nested tests

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/nested.sh: allow using custom auto-import assert for tests

This will be the case for tests with models signed by the developer1 testkeys
account.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/nested.sh: if NESTED_CORE_CHANNEL is empty, don't specify --channel

For tests that will use non-dangerous uc20 models, we cannot override the
channel used, as the channel used has to come from the model.

To accommodate this, tests that will use non-dangerous models will need to set
NESTED_CORE_CHANNEL to empty. It remains to be seen how devices with such a
model would use tests that also currently use NESTED_CORE_CHANNEL, but we should
deal with that when necessary to unblock testing non-dangerous uc20 models here.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/nested.sh: set UBUNTU_IMAGE_SNAP_CMD when building an image

This allows us to test nested VM's built with the most recent version of
"snap prepare-image" available, specifically the one from the spread run itself.

It also has the useful side effect of allowing us to build images with snap
declarations signed and provided by the fakestore, because this snap command
will have the trustkeys built into it.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/nested.sh: allow setting SNAPPY_FORCE_SAS_URL for ubuntu-image only

We usually only want to set SNAPPY_FORCE_SAS_URL during the image build process
when we are using the fakestore with nested tests, as setting it globally will
have the unfortunate side-effect of making all "snap install" or "snap download"
commands talk to the fakestore instead of the real store which may not always
work with the fakestore.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/store.sh: add make_snap_installable_with_id

This allows providing a .snap file and a specific snap ID, and creating
appropriate snap-revisions and snap-declarations in the provided store top-dir.

This is useful because oftentimes we want to use a specific snap ID with the
generated assertions, for example the snapd snap needs to have a specific snap
ID when building a UC20 image.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/nested.sh: add vars for fakestore dir and to sign snaps with fakestore

This is useful for building UC images that are signed by and use the fakestore
assertions. We hard-code all of the snap ID's here to the real ones to prevent
any issues in tests that may arise from having unexpected snap ID's for the
required snaps.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/assertions: add model, sys-user assertions for developer1 UC20 tests

The system user assertion here was generated with a customized version of
gendeveloper1model and should be committed later when ready.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/nested.sh: use local var, rename as per shell style

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/nested.sh drop unnecessary sudo, fix whitespace

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* tests/lib/store.sh: install jq with specific base using core-config

This prevents unnecessarily pulling in additional base snaps when not needed

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-09-16 13:49:07 -03:00

45 lines
1.4 KiB
Plaintext

type: model
authority-id: developer1
series: 16
brand-id: developer1
model: testkeys-snapd-secured-core-20-amd64
architecture: amd64
base: core20
grade: secured
serial-authority:
- generic
snaps:
-
default-channel: 20/edge
id: UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH
name: pc
type: gadget
-
default-channel: 20/edge
id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza
name: pc-kernel
type: kernel
-
default-channel: latest/stable
id: DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q
name: core20
type: base
-
default-channel: latest/stable
id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4
name: snapd
type: snapd
timestamp: 2018-09-11T22:00:00+00:00
sign-key-sha3-384: EAD4DbLxK_kn0gzNCXOs3kd6DeMU3f-L6BEsSEuJGBqCORR0gXkdDxMbOm11mRFu
AcLBUgQAAQoABgUCX1u6/gAAiM0QAKZibjwRmgiMGSNtZiTlqu6wQsFY+8gETYTem9S4pyDlg3mY
r+Ij8E7b0QmhG5yO4b5zXaNy0z2VvyJoZupUUR6yB2E3O9iyDA4hzQAIXwROxq6szZt7j3KJJxez
+EPXf4gfGB20ImPCvkLFd4MkZgDlW8xrWVOTppUBpMdBQiUhuszl1Wc0ZxvgTVMVghn1y19kUFYD
TYIQ4czF26h4Wk4F1ZOxNQmFWDjvzgCVO2dPgo9J4/pW+WXluIEgzxG0yUt9hCbCf1K9U6Pt/27l
OZ7SxByPJnJWPuMUJSBpgVdwQeLIs3EeU2f6xPSwt186aHh5RL19t/HHi/yr5t5ijZnAhLXqIyhw
HmgpdxsnFCXW71IYTtcMMTMNJKqCgC49vVic5NKtCTcG3HXZIskO7OMPBz/L2GpN3gDSxa30qxRh
xrZp3SBGjVn6fU1uUV0VZkjLwLeOUam9aJ571aNY0/85hjLtI0FX67QwvXxUn0ikuEUzJx1R92BX
EhW9YuriSeewHVWBiuHcTQEJHiE+XmWvqC2HYGCEppGzMH4WqkABHokiYJlKC++h8BeWyhWiXcp4
umVahzY1L0QYF6ajwG2MeF09E9S3PiqTTS+CBDk9zTZli3o7PP4lwS6lB5m2usf/0GFToC9WeOpl
BbqMScaWHSrUk/ArC2VW0VFLtEiR