Merge "Use assert_flavor_equal to check flavor before and after microversion 2.46"

This commit is contained in:
Zuul 2019-07-01 00:29:40 +00:00 committed by Gerrit Code Review
commit daa06aaa6e

View File

@ -417,10 +417,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE') waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
# Make sure everything still looks OK. # Make sure everything still looks OK.
server = self.client.show_server(self.server_id)['server'] server = self.client.show_server(self.server_id)['server']
# The flavor id is not returned in the server response after self.assert_flavor_equal(self.flavor_ref, server['flavor'])
# microversion 2.46 so handle that gracefully.
if server['flavor'].get('id'):
self.assertEqual(self.flavor_ref, server['flavor']['id'])
attached_volumes = server['os-extended-volumes:volumes_attached'] attached_volumes = server['os-extended-volumes:volumes_attached']
self.assertEqual(1, len(attached_volumes)) self.assertEqual(1, len(attached_volumes))
self.assertEqual(volume['id'], attached_volumes[0]['id']) self.assertEqual(volume['id'], attached_volumes[0]['id'])