mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
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.