Skip to content

Commit

Permalink
o/snapstate: make tests work consistently also in containers
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronis committed Dec 5, 2023
1 parent 5ae1c96 commit b1e223a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions overlord/snapstate/snapstate_test.go
Expand Up @@ -45,6 +45,7 @@ import (
"github.com/snapcore/snapd/interfaces"
"github.com/snapcore/snapd/logger"
"github.com/snapcore/snapd/osutil"
"github.com/snapcore/snapd/osutil/squashfs"
"github.com/snapcore/snapd/overlord"
"github.com/snapcore/snapd/overlord/auth"
userclient "github.com/snapcore/snapd/usersession/client"
Expand Down Expand Up @@ -171,6 +172,9 @@ func (s *snapmgrBaseTest) SetUpTest(c *C) {
downloadError: make(map[string]error),
}

// make tests work consistently also in containers
s.AddCleanup(squashfs.MockNeedsFuse(false))

// setup a bootloader for policy and boot
s.bl = bootloadertest.Mock("mock", c.MkDir())
bootloader.Force(s.bl)
Expand Down

0 comments on commit b1e223a

Please sign in to comment.