summaryrefslogtreecommitdiff
path: root/libvirt/pool_sync_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libvirt/pool_sync_test.go')
-rw-r--r--libvirt/pool_sync_test.go46
1 files changed, 0 insertions, 46 deletions
diff --git a/libvirt/pool_sync_test.go b/libvirt/pool_sync_test.go
deleted file mode 100644
index 90ad4849..00000000
--- a/libvirt/pool_sync_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package libvirt
-
-import (
- "testing"
-)
-
-func TestAcquireLock(t *testing.T) {
- ps := NewLVirtPoolSync()
-
- ps.AcquireLock("test")
-
- _, found := ps.PoolLocks["test"]
-
- if !found {
- t.Errorf("lock not found")
- }
-}
-
-func TestReleaseLock(t *testing.T) {
- ps := NewLVirtPoolSync()
-
- ps.AcquireLock("test")
-
- _, found := ps.PoolLocks["test"]
- if !found {
- t.Errorf("lock not found")
- }
-
- ps.ReleaseLock("test")
- _, found = ps.PoolLocks["test"]
- if !found {
- t.Errorf("lock not found")
- }
-}
-
-func TestReleaseNotExistingLock(t *testing.T) {
- ps := NewLVirtPoolSync()
-
- ps.ReleaseLock("test")
- _, found := ps.PoolLocks["test"]
- if found {
- t.Errorf("lock found")
- }
- // moreover there should be no runtime error because
- // we are not trying to unlock a not-locked mutex
-}