Merge "Fix test_list_flavors for compute microversion 2.55"

This commit is contained in:
Zuul 2020-09-12 03:58:09 +00:00 committed by Gerrit Code Review
commit a86b565990
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ class FlavorsV2TestJSON(base.BaseV2ComputeTest):
flavor = self.flavors_client.show_flavor(self.flavor_ref)['flavor'] flavor = self.flavors_client.show_flavor(self.flavor_ref)['flavor']
flavor_min_detail = {'id': flavor['id'], 'links': flavor['links'], flavor_min_detail = {'id': flavor['id'], 'links': flavor['links'],
'name': flavor['name']} 'name': flavor['name']}
# description field is added to the response of list_flavors in 2.55
if not self.is_requested_microversion_compatible('2.54'):
flavor_min_detail.update({'description': flavor['description']})
self.assertIn(flavor_min_detail, flavors) self.assertIn(flavor_min_detail, flavors)
@decorators.idempotent_id('6e85fde4-b3cd-4137-ab72-ed5f418e8c24') @decorators.idempotent_id('6e85fde4-b3cd-4137-ab72-ed5f418e8c24')