From abe6a6e5ac91dee4999257a9ac9ec1377a168df3 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Thu, 22 Jul 2021 12:43:29 +0530 Subject: [PATCH] util: remove deleteLock test as it is enforced by the controller Signed-off-by: Humble Chirammal --- internal/util/idlocker_test.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/internal/util/idlocker_test.go b/internal/util/idlocker_test.go index ea18885c6..365e84162 100644 --- a/internal/util/idlocker_test.go +++ b/internal/util/idlocker_test.go @@ -60,10 +60,6 @@ func TestOperationLocks(t *testing.T) { if err != nil { t.Errorf("failed to acquire clone lock for %s %s", volumeID, err) } - err = lock.GetDeleteLock(volumeID) - if err == nil { - t.Errorf("expected to fail for GetDeleteLock for %s", volumeID) - } err = lock.GetExpandLock(volumeID) if err == nil { @@ -106,11 +102,6 @@ func TestOperationLocks(t *testing.T) { if err != nil { t.Errorf("failed to acquire restore lock for %s %s", volumeID, err) } - // try for snapshot delete lock - err = lock.GetDeleteLock(volumeID) - if err == nil { - t.Errorf("expected to fail for GetDeleteLock for %s", volumeID) - } // release all restore locks lock.ReleaseRestoreLock(volumeID) lock.ReleaseRestoreLock(volumeID) @@ -120,10 +111,6 @@ func TestOperationLocks(t *testing.T) { if err != nil { t.Errorf("failed to acquire createSnapshot lock for %s %s", volumeID, err) } - err = lock.GetDeleteLock(volumeID) - if err == nil { - t.Errorf("expected to fail for GetDeleteLock for %s", volumeID) - } lock.ReleaseSnapshotCreateLock(volumeID) err = lock.GetDeleteLock(volumeID)