Don't make assumptions about present devices

Instead of using '/dev/vdc' for a test, use a loop device, since
it should always be available and it allows us to set a specific
size for it.
This commit is contained in:
Luciano Lo Giudice
2021-09-20 20:06:37 -03:00
parent 879d35d6fb
commit 839e1a0868
@@ -94,11 +94,11 @@ class CinderLVMTest(test_utils.OpenStackBaseTest):
self.assertTrue(host.startswith('cinder@LVM'))
def test_volume_overwrite(self):
"""Test creating a volume by overwriting one on the /dev/vdc device."""
"""Test creating a volume by overwriting one on a loop device."""
with self.config_change({'overwrite': 'false',
'block-device': self.block_device},
{'overwrite': 'true',
'block-device': '/dev/vdc'}):
'block-device': '/tmp/vol|2G'}):
self._create_volume()
def test_device_none(self):