diff --git a/images/agent/src/internal/utils/volume_cleanup_ee_test.go b/images/agent/src/internal/utils/volume_cleanup_ee_test.go index 3f7f0b72..eee8b86d 100644 --- a/images/agent/src/internal/utils/volume_cleanup_ee_test.go +++ b/images/agent/src/internal/utils/volume_cleanup_ee_test.go @@ -82,7 +82,9 @@ var _ = Describe("Cleaning up volume", func() { }) It("fails with same error", func() { doCall() - Expect(err).To(MatchError(deviceOpenError)) + if feature.VolumeCleanupEnabled() { + Expect(err).To(MatchError(deviceOpenError)) + } }) })