diff --git a/pkg/elemental/elemental_test.go b/pkg/elemental/elemental_test.go index a669df4a138..8cfead20866 100644 --- a/pkg/elemental/elemental_test.go +++ b/pkg/elemental/elemental_test.go @@ -885,8 +885,8 @@ var _ = Describe("Elemental", Label("elemental"), func() { Expect(err).ShouldNot(HaveOccurred()) relabelCmd = []string{ - "setfiles", "-c", policyFile, "-e", "/dev", "-e", "/proc", "-e", "/sys", - "-F", constants.SELinuxTargetedContextFile, "/", + "setfiles", "-e", "/dev", "-e", "/proc", "-e", "/sys", + "-i", "-F", constants.SELinuxTargetedContextFile, "/", } }) It("does nothing if the context file is not found", func() { @@ -929,7 +929,7 @@ var _ = Describe("Elemental", Label("elemental"), func() { Expect(err).ShouldNot(HaveOccurred()) relabelCmd = []string{ - "setfiles", "-c", policyFile, "-F", "-r", "/root", contextFile, "/root", + "setfiles", "-i", "-F", "-r", "/root", contextFile, "/root", } Expect(elemental.SelinuxRelabel(*config, "/root")).To(BeNil()) diff --git a/pkg/snapshotter/btrfs_test.go b/pkg/snapshotter/btrfs_test.go index 6308a0b94f5..12eae5703d2 100644 --- a/pkg/snapshotter/btrfs_test.go +++ b/pkg/snapshotter/btrfs_test.go @@ -46,6 +46,7 @@ var _ = Describe("Btrfs", Label("snapshotter", " btrfs"), func() { var snapCfg types.SnapshotterConfig var rootDir, efiDir string var statePart *types.Partition + var syscall *mocks.FakeSyscall BeforeEach(func() { rootDir = "/some/root" @@ -57,6 +58,7 @@ var _ = Describe("Btrfs", Label("snapshotter", " btrfs"), func() { efiDir = constants.EfiDir runner = mocks.NewFakeRunner() mounter = mocks.NewFakeMounter() + syscall = &mocks.FakeSyscall{} bootloader = &mocks.FakeBootloader{} memLog = bytes.NewBuffer(nil) logger = types.NewBufferLogger(memLog) @@ -71,6 +73,7 @@ var _ = Describe("Btrfs", Label("snapshotter", " btrfs"), func() { conf.WithRunner(runner), conf.WithLogger(logger), conf.WithMounter(mounter), + conf.WithSyscall(syscall), conf.WithPlatform("linux/amd64"), ) snapCfg = types.SnapshotterConfig{ diff --git a/pkg/snapshotter/loopdevice_test.go b/pkg/snapshotter/loopdevice_test.go index 6afa630244e..7620958126b 100644 --- a/pkg/snapshotter/loopdevice_test.go +++ b/pkg/snapshotter/loopdevice_test.go @@ -44,6 +44,7 @@ var _ = Describe("LoopDevice", Label("snapshotter", "loopdevice"), func() { var snapCfg types.SnapshotterConfig var rootDir, efiDir string var statePart *types.Partition + var syscall *mocks.FakeSyscall BeforeEach(func() { rootDir = "/some/root" @@ -55,6 +56,7 @@ var _ = Describe("LoopDevice", Label("snapshotter", "loopdevice"), func() { efiDir = constants.EfiDir runner = mocks.NewFakeRunner() mounter = mocks.NewFakeMounter() + syscall = &mocks.FakeSyscall{} bootloader = &mocks.FakeBootloader{} memLog = bytes.NewBuffer(nil) logger = types.NewBufferLogger(memLog) @@ -69,6 +71,7 @@ var _ = Describe("LoopDevice", Label("snapshotter", "loopdevice"), func() { conf.WithRunner(runner), conf.WithLogger(logger), conf.WithMounter(mounter), + conf.WithSyscall(syscall), conf.WithPlatform("linux/amd64"), ) snapCfg = types.NewLoopDevice()