|
14 | 14 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
15 | 15 | # MA 02110-1301 USA. |
16 | 16 |
|
17 | | -import libvirt |
18 | 17 | import virtinst |
19 | 18 | from virtinst import VirtualDisk |
20 | 19 |
|
21 | 20 | # Test helpers |
| 21 | +import tests |
22 | 22 | from storage import createPool, createVol |
23 | 23 |
|
24 | 24 | import unittest |
|
41 | 41 | # We install several storage pools on the connection to ensure |
42 | 42 | # we aren't bumping up against errors in that department. |
43 | 43 | logging.debug("\n\nStarting 'validation' storage setup.") |
44 | | -testconn = libvirt.open("test:///default") |
| 44 | +testconn = tests.open_testdriver() |
45 | 45 | testcaps = virtinst.CapabilitiesParser.parse(testconn.getCapabilities()) |
46 | 46 |
|
47 | 47 | virtimage = virtinst.ImageParser.parse_file("tests/image-xml/image.xml") |
|
138 | 138 | { 'conn' : testconn, 'volName' : ("pool-exist", "vol-noexist")}, |
139 | 139 | { 'conn' : testconn, 'volName' : ( 1234, "vol-noexist")}, |
140 | 140 | { 'path' : 'valid', 'size' : 1, 'driverCache' : 'invalid' }, |
| 141 | + { 'conn' : testconn, "path" : "/full-pool/newvol.img", "size" : 1, |
| 142 | + 'sparse' : False }, |
141 | 143 | ], |
142 | 144 |
|
143 | 145 | 'valid' : [ |
|
151 | 153 | { 'conn' : testconn, 'path' : "/pool-exist/vol-noexist", 'size' : 1 }, |
152 | 154 | { 'conn' : testconn, 'volInstall': volinst}, |
153 | 155 | { 'path' : 'nonexist', 'size' : 1, 'driverCache' : 'writethrough' }, |
| 156 | + # Full pool, but we are nonsparse |
| 157 | + { 'conn' : testconn, "path" : "/full-pool/newvol.img", "size" : 1 }, |
154 | 158 | ] |
155 | 159 | }, |
156 | 160 |
|
|
0 commit comments