mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
* 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>
40 lines
1.0 KiB
JSON
40 lines
1.0 KiB
JSON
{
|
|
"type": "model",
|
|
"authority-id": "developer1",
|
|
"series": "16",
|
|
"brand-id": "developer1",
|
|
"model": "testkeys-snapd-secured-core-20-amd64",
|
|
"architecture": "amd64",
|
|
"timestamp": "2018-09-11T22:00:00+00:00",
|
|
"grade": "secured",
|
|
"base": "core20",
|
|
"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"
|
|
}
|
|
]
|
|
} |