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

Commit 1d8413d

Browse files
committed
tests: Add inactive pool VirtualDisk validation
1 parent 1b52b97 commit 1d8413d

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

tests/testdriver.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,38 @@
188188
</volume>
189189
</pool>
190190

191+
<pool type='dir'>
192+
<name>inactive-pool</name>
193+
<uuid>35bb2aaa-388a-cdfe-461a-b8907f6e53fe</uuid>
194+
<capacity>107374182400</capacity>
195+
<allocation>0</allocation>
196+
<available>107374182400</available>
197+
<source>
198+
</source>
199+
<target>
200+
<path>/inactive-pool</path>
201+
<permissions>
202+
<mode>0700</mode>
203+
<owner>10736</owner>
204+
<group>10736</group>
205+
</permissions>
206+
</target>
207+
208+
<volume>
209+
<name>inactive-vol</name>
210+
<capacity>1000000</capacity>
211+
<allocation>50000</allocation>
212+
<target>
213+
<format type='qcow2'/>
214+
<permissions>
215+
<mode>0700</mode>
216+
<owner>10736</owner>
217+
<group>10736</group>
218+
</permissions>
219+
</target>
220+
</volume>
221+
</pool>
222+
191223
<pool type='dir'>
192224
<name>cross-pool</name>
193225
<uuid>35bb2ad9-388a-cdfe-461a-b8907f6e5abc</uuid>

tests/validation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
name="val-vol",
5151
capacity=1)
5252

53+
tmppool = testconn.storagePoolLookupByName("inactive-pool")
54+
tmppool.destroy()
55+
5356
iface_proto1 = Interface.InterfaceProtocol.protocol_class_for_family(
5457
Interface.InterfaceProtocol.INTERFACE_PROTOCOL_FAMILY_IPV4)()
5558
iface_proto2 = Interface.InterfaceProtocol.protocol_class_for_family(
@@ -130,6 +133,8 @@
130133
{ 'path' : 'valid', 'size' : 1, 'driverCache' : 'invalid' },
131134
{ 'conn' : testconn, "path" : "/full-pool/newvol.img", "size" : 1,
132135
'sparse' : False },
136+
# Inactive pool w/ volume
137+
{ 'conn' : testconn, "path" : "/inactive-pool/inactive-vol"},
133138
],
134139

135140
'valid' : [

0 commit comments

Comments
 (0)