From 83f524af28cc0e2de76eb3d85ba35986153eabb9 Mon Sep 17 00:00:00 2001 From: zhufl Date: Wed, 26 Jun 2019 17:26:13 +0800 Subject: [PATCH] Use assert_flavor_equal to check flavor before and after microversion 2.46 Flavor id is not returned in the server response after microversion 2.46, but we can use base.assert_flavor_equal to check flavor before and after microversion 2.46. Change-Id: If04005a3ff5ef4b1faa4d2179ba2987abdd5ef04 --- tempest/api/compute/servers/test_server_actions.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py index f6c3e73fea..d47ff51cb7 100644 --- a/tempest/api/compute/servers/test_server_actions.py +++ b/tempest/api/compute/servers/test_server_actions.py @@ -417,10 +417,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest): waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE') # Make sure everything still looks OK. server = self.client.show_server(self.server_id)['server'] - # The flavor id is not returned in the server response after - # microversion 2.46 so handle that gracefully. - if server['flavor'].get('id'): - self.assertEqual(self.flavor_ref, server['flavor']['id']) + self.assert_flavor_equal(self.flavor_ref, server['flavor']) attached_volumes = server['os-extended-volumes:volumes_attached'] self.assertEqual(1, len(attached_volumes)) self.assertEqual(volume['id'], attached_volumes[0]['id'])