This is the same fix as commit 17fbdc7c, but in other tests.
The current code will mock the `amd64` architecture when running some
tests but it does not mock the `grub.cfg:static-cmdline` or the
`grub-recovery.cfg:static-cmdline`. This is needed because the
`bootloader/asserts` package registers the cmdline via `init()` so
this happens before the architecture is mocked in the testing
code. Hence the tests will fail when inspecting the command line on
non amd64/i386 machines.
This commit makes the mocking explicit. An alternative approach would
be to move the snippet registration out of `init()` and run it on
first boot but that has it's own problems so this other approach was
followed.
This commit replaces the use of "sanity" with more inclusive
naming. When "sanity" is used in a more general sense either
"validity" or "quick" is used.
This commit replaces the use of "sanity" with more inclusive
naming.
When `sanity` is used in a more general sense either `validity`
or `quick` is used.
Consider factory-reset mode when sealing and resealing keys. Allow factory-reset
mode only for tested recovery systems.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
One last fix for tests failing on non amd64:
----------------------------------------------------------------------
FAIL: makebootable_test.go:791: makeBootable20Suite.TestMakeRunnableSystem20RunModeSealKeyErr
makebootable_test.go:893:
c.Assert(err, IsNil)
... value *errors.errorString = &errors.errorString{s:"cannot copy trusted asset to cache: read /tmp/check-855608922/49/run/mnt/ubuntu-seed: is a directory"} ("cannot copy trusted asset to cache: read /tmp/check-855608922/49/run/mnt/ubuntu-seed: is a directory")
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Merge pull request #11374 from anonymouse64/feature/uc20-multi-volume-gadget-asset-updates-26
This file will be necessary later on when we perform multi-volume gadget asset
updates.
This will be necessary later on when we perform multi-volume gadget asset
updates.
Also adjust install mode unit tests for install.Run() to check this file too.
Also test for the disk-mapping.json in some spread tests too.