@@ -17,10 +17,11 @@ 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 , unused_disks ):
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
+ sr_disk = unused_disks [host ][0 ]
24
25
sr = None
25
26
try :
26
27
sr = host .sr_create ('xfs' , "XFS-local-SR-test" , {'device' : '/dev/' + sr_disk })
@@ -30,9 +31,10 @@ def test_create_xfs_sr_without_xfsprogs(self, host, sr_disk):
30
31
sr .destroy ()
31
32
assert False , "SR creation should not have succeeded!"
32
33
33
- def test_create_and_destroy_sr (self , sr_disk , host_with_xfsprogs ):
34
+ def test_create_and_destroy_sr (self , unused_disks , host_with_xfsprogs ):
34
35
# Create and destroy tested in the same test to leave the host as unchanged as possible
35
36
host = host_with_xfsprogs
37
+ sr_disk = unused_disks [host ][0 ]
36
38
sr = host .sr_create ('xfs' , "XFS-local-SR-test" , {'device' : '/dev/' + sr_disk }, verify = True )
37
39
# import a VM in order to detect vm import issues here rather than in the vm_on_xfs fixture used in
38
40
# the next tests, because errors in fixtures break teardown
0 commit comments