Don't use tempest special_fields

This has been removed, which now causes these
tests to fail.

Tempest change: https://review.openstack.org/#/c/448869/

Change-Id: I31310dc9b3834e0bf16618db3e473f17eab2b610
(cherry picked from commit 39c7165e33)
This commit is contained in:
Eric Harney 2017-03-24 15:24:39 -04:00
parent 5d20d42597
commit 0f5c408402
2 changed files with 7 additions and 12 deletions

View File

@ -79,8 +79,7 @@ class ConsistencyGroupsV2Test(base.BaseVolumeAdminTest):
cg = create_consistencygroup(volume_type['id'], cg = create_consistencygroup(volume_type['id'],
name=cg_name)['consistencygroup'] name=cg_name)['consistencygroup']
vol_name = data_utils.rand_name("volume") vol_name = data_utils.rand_name("volume")
self.name_field = self.special_fields['name_field'] params = {'name': vol_name,
params = {self.name_field: vol_name,
'volume_type': volume_type['id'], 'volume_type': volume_type['id'],
'consistencygroup_id': cg['id'], 'consistencygroup_id': cg['id'],
'size': CONF.volume.volume_size} 'size': CONF.volume.volume_size}
@ -123,8 +122,7 @@ class ConsistencyGroupsV2Test(base.BaseVolumeAdminTest):
cg = create_consistencygroup(volume_type['id'], cg = create_consistencygroup(volume_type['id'],
name=cg_name)['consistencygroup'] name=cg_name)['consistencygroup']
vol_name = data_utils.rand_name("volume") vol_name = data_utils.rand_name("volume")
self.name_field = self.special_fields['name_field'] params = {'name': vol_name,
params = {self.name_field: vol_name,
'volume_type': volume_type['id'], 'volume_type': volume_type['id'],
'consistencygroup_id': cg['id'], 'consistencygroup_id': cg['id'],
'size': CONF.volume.volume_size} 'size': CONF.volume.volume_size}
@ -183,8 +181,7 @@ class ConsistencyGroupsV2Test(base.BaseVolumeAdminTest):
cg = create_consistencygroup(volume_type['id'], cg = create_consistencygroup(volume_type['id'],
name=cg_name)['consistencygroup'] name=cg_name)['consistencygroup']
vol_name = data_utils.rand_name("volume") vol_name = data_utils.rand_name("volume")
self.name_field = self.special_fields['name_field'] params = {'name': vol_name,
params = {self.name_field: vol_name,
'volume_type': volume_type['id'], 'volume_type': volume_type['id'],
'consistencygroup_id': cg['id'], 'consistencygroup_id': cg['id'],
'size': CONF.volume.volume_size} 'size': CONF.volume.volume_size}
@ -249,8 +246,7 @@ class ConsistencyGroupsV2Test(base.BaseVolumeAdminTest):
cg = create_consistencygroup(volume_type['id'], cg = create_consistencygroup(volume_type['id'],
name=cg_name)['consistencygroup'] name=cg_name)['consistencygroup']
vol_name = data_utils.rand_name("volume") vol_name = data_utils.rand_name("volume")
self.name_field = self.special_fields['name_field'] params = {'name': vol_name,
params = {self.name_field: vol_name,
'volume_type': volume_type['id'], 'volume_type': volume_type['id'],
'consistencygroup_id': cg['id'], 'consistencygroup_id': cg['id'],
'size': CONF.volume.volume_size} 'size': CONF.volume.volume_size}

View File

@ -36,10 +36,9 @@ class CinderUnicodeTest(volume_base.BaseVolumeTest):
@classmethod @classmethod
def create_volume_with_args(cls, **kwargs): def create_volume_with_args(cls, **kwargs):
name = kwargs['name'] or data_utils.rand_name('Volume') if 'name' not in kwargs:
kwargs['name'] = data_utils.rand_name('Volume')
name_field = cls.special_fields['name_field']
kwargs[name_field] = name
kwargs['size'] = CONF.volume.volume_size kwargs['size'] = CONF.volume.volume_size
volume = cls.volumes_client.create_volume(**kwargs)['volume'] volume = cls.volumes_client.create_volume(**kwargs)['volume']
@ -56,5 +55,5 @@ class CinderUnicodeTest(volume_base.BaseVolumeTest):
result = self.volumes_client.show_volume(self.volumes[0]['id']) result = self.volumes_client.show_volume(self.volumes[0]['id'])
fetched_volume = result['volume'] fetched_volume = result['volume']
self.assertEqual(fetched_volume[self.special_fields['name_field']], self.assertEqual(fetched_volume['name'],
self.volume_name) self.volume_name)