@@ -17,23 +17,29 @@ class TestXFSSRCreateDestroy:
17
17
and VM import.
18
18
"""
19
19
20
- def test_create_xfs_sr_without_xfsprogs (self , host , sr_disk ):
20
+ def test_create_xfs_sr_without_xfsprogs (self , host , image_format , sr_disk ):
21
21
# This test must be the first in the series in this module
22
22
assert not host .file_exists ('/usr/sbin/mkfs.xfs' ), \
23
23
"xfsprogs must not be installed on the host at the beginning of the tests"
24
24
sr = None
25
25
try :
26
- sr = host .sr_create ('xfs' , "XFS-local-SR-test" , {'device' : '/dev/' + sr_disk })
26
+ sr = host .sr_create ('xfs' , "XFS-local-SR-test" , {
27
+ 'device' : '/dev/' + sr_disk ,
28
+ 'preferred-image-formats' : image_format
29
+ })
27
30
except Exception :
28
31
logging .info ("SR creation failed, as expected." )
29
32
if sr is not None :
30
33
sr .destroy ()
31
34
assert False , "SR creation should not have succeeded!"
32
35
33
- def test_create_and_destroy_sr (self , sr_disk , host_with_xfsprogs ):
36
+ def test_create_and_destroy_sr (self , sr_disk , host_with_xfsprogs , image_format ):
34
37
# Create and destroy tested in the same test to leave the host as unchanged as possible
35
38
host = host_with_xfsprogs
36
- sr = host .sr_create ('xfs' , "XFS-local-SR-test" , {'device' : '/dev/' + sr_disk }, verify = True )
39
+ sr = host .sr_create ('xfs' , "XFS-local-SR-test" , {
40
+ 'device' : '/dev/' + sr_disk ,
41
+ 'preferred-image-formats' : image_format
42
+ }, verify = True )
37
43
# import a VM in order to detect vm import issues here rather than in the vm_on_xfs fixture used in
38
44
# the next tests, because errors in fixtures break teardown
39
45
vm = host .import_vm (vm_image ('mini-linux-x86_64-bios' ), sr_uuid = sr .uuid )
0 commit comments