Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Commit a0352fc

Browse files
committed
Avoid clashing path with default storage pool
The test driver provides a default storage pool at /default-pool. Libvirt now enforces source path uniqueness, so we must pick a different path for our test pools. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
1 parent d5e0ada commit a0352fc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

connect_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ func TestStoragePoolDefineXML(t *testing.T) {
789789
}()
790790
defName := "default-pool-test-0"
791791
xml := `<pool type='dir'><name>default-pool-test-0</name><target>
792-
<path>/default-pool</path></target></pool>`
792+
<path>/default-pool-test-0</path></target></pool>`
793793
pool, err := conn.StoragePoolDefineXML(xml, 0)
794794
if err != nil {
795795
t.Fatal(err)
@@ -900,7 +900,7 @@ func TestLookupStorageVolByKey(t *testing.T) {
900900
return
901901
}
902902
defer pool.Destroy()
903-
defPoolPath := "default-pool"
903+
defPoolPath := "default-pool-test-1"
904904
defVolName := time.Now().String()
905905
defVolKey := "/" + defPoolPath + "/" + defVolName
906906
vol, err := pool.StorageVolCreateXML(testStorageVolXML(defVolName, defPoolPath), 0)
@@ -942,7 +942,7 @@ func TestLookupStorageVolByPath(t *testing.T) {
942942
return
943943
}
944944
defer pool.Destroy()
945-
defPoolPath := "default-pool"
945+
defPoolPath := "default-pool-test-1"
946946
defVolName := time.Now().String()
947947
defVolPath := "/" + defPoolPath + "/" + defVolName
948948
vol, err := pool.StorageVolCreateXML(testStorageVolXML(defVolName, defPoolPath), 0)

storage_pool_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func buildTestStoragePool(poolName string) (*StoragePool, *Connect) {
4242
pool, err := conn.StoragePoolDefineXML(`<pool type='dir'>
4343
<name>`+name+`</name>
4444
<target>
45-
<path>/default-pool</path>
45+
<path>/default-pool-test-1</path>
4646
</target>
4747
</pool>`, 0)
4848
if err != nil {

0 commit comments

Comments
 (0)