Tests: Datacore: Fix InvalidUUID warnings

Use a UUID for volume_type_id to prevent InvalidUUID
warnings when running unit tests.

Change-Id: Icf7e0ae1e70cee9ff8055ff1cddb9717cb24c59f
This commit is contained in:
Eric Harney 2022-07-21 15:35:22 -04:00
parent f8fa57a8b9
commit 75912ad1fd
1 changed files with 5 additions and 5 deletions

View File

@ -355,7 +355,7 @@ class DataCoreVolumeDriverTestCase(object):
'get_volume_type')
get_volume_type.return_value = volume_type
volume = self.volume_a
volume['volume_type_id'] = 'volume_type_id'
volume['volume_type_id'] = fake_constants.VOLUME_TYPE_ID
result = driver.create_volume(volume)
self.assertIn('provider_location', result)
self.assertEqual(virtual_disk.Id, result['provider_location'])
@ -381,7 +381,7 @@ class DataCoreVolumeDriverTestCase(object):
'get_volume_type')
get_volume_type.return_value = volume_type
volume = self.volume_a
volume['volume_type_id'] = 'volume_type_id'
volume['volume_type_id'] = fake_constants.VOLUME_TYPE_ID
result = driver.create_volume(volume)
self.assertIn('provider_location', result)
self.assertEqual(virtual_disk.Id, result['provider_location'])
@ -405,7 +405,7 @@ class DataCoreVolumeDriverTestCase(object):
'get_volume_type')
get_volume_type.return_value = volume_type
volume = self.volume_a
volume['volume_type_id'] = 'volume_type_id'
volume['volume_type_id'] = fake_constants.VOLUME_TYPE_ID
result = driver.create_volume(volume)
self.assertIn('provider_location', result)
self.assertEqual(virtual_disk.Id, result['provider_location'])
@ -441,7 +441,7 @@ class DataCoreVolumeDriverTestCase(object):
'get_volume_type')
get_volume_type.return_value = volume_type
volume = self.volume_a
volume['volume_type_id'] = 'volume_type_id'
volume['volume_type_id'] = fake_constants.VOLUME_TYPE_ID
self.assertRaises(cinder_exception.VolumeDriverException,
driver.create_volume,
volume)
@ -463,7 +463,7 @@ class DataCoreVolumeDriverTestCase(object):
'get_volume_type')
get_volume_type.return_value = volume_type
volume = self.volume_a
volume['volume_type_id'] = 'volume_type_id'
volume['volume_type_id'] = fake_constants.VOLUME_TYPE_ID
self.assertRaises(cinder_exception.VolumeDriverException,
driver.create_volume,
volume)