From 1a98f00a6df8d30ba18a81f466b35c2cd4f58e8a Mon Sep 17 00:00:00 2001 From: Maciej Borzecki Date: Wed, 29 Jan 2025 11:09:55 +0100 Subject: [PATCH] overlord/fdestate: mock amd64 architecture in unit tests Mock the architecture so that boot assets can be properly identified even when running unit tests on ARM64. Signed-off-by: Maciej Borzecki --- overlord/fdestate/fdemgr_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlord/fdestate/fdemgr_test.go b/overlord/fdestate/fdemgr_test.go index b80b5cb451b..efd27c3f2c1 100644 --- a/overlord/fdestate/fdemgr_test.go +++ b/overlord/fdestate/fdemgr_test.go @@ -30,6 +30,7 @@ import ( . "gopkg.in/check.v1" + "github.com/snapcore/snapd/arch/archtest" "github.com/snapcore/snapd/asserts" "github.com/snapcore/snapd/boot" "github.com/snapcore/snapd/dirs" @@ -72,6 +73,8 @@ func (s *fdeMgrSuite) SetUpTest(c *C) { dirs.SetRootDir(s.rootdir) s.AddCleanup(func() { dirs.SetRootDir("") }) + s.AddCleanup(archtest.MockArchitecture("amd64")) + s.o = overlord.Mock() s.st = s.o.State()