util: remove deleteLock test as it is enforced by the controller

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2021-07-22 12:43:29 +05:30 committed by mergify[bot]
parent c42d4768ca
commit abe6a6e5ac

View File

@ -60,10 +60,6 @@ func TestOperationLocks(t *testing.T) {
if err != nil { if err != nil {
t.Errorf("failed to acquire clone lock for %s %s", volumeID, err) 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) err = lock.GetExpandLock(volumeID)
if err == nil { if err == nil {
@ -106,11 +102,6 @@ func TestOperationLocks(t *testing.T) {
if err != nil { if err != nil {
t.Errorf("failed to acquire restore lock for %s %s", volumeID, err) 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 // release all restore locks
lock.ReleaseRestoreLock(volumeID) lock.ReleaseRestoreLock(volumeID)
lock.ReleaseRestoreLock(volumeID) lock.ReleaseRestoreLock(volumeID)
@ -120,10 +111,6 @@ func TestOperationLocks(t *testing.T) {
if err != nil { if err != nil {
t.Errorf("failed to acquire createSnapshot lock for %s %s", volumeID, err) 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) lock.ReleaseSnapshotCreateLock(volumeID)
err = lock.GetDeleteLock(volumeID) err = lock.GetDeleteLock(volumeID)