From 5d367151817bd612117707e86f099a8f52e646f4 Mon Sep 17 00:00:00 2001 From: Jordan Pittier Date: Wed, 19 Aug 2015 12:03:49 +0200 Subject: [PATCH] scenario/test_minimum_basic: relax a MatchesDictExceptForKeys check In the test_minimum_basic scenario, we check that a server that was created a moment ago is the same as the server we just got. To do that each fields of the expected vs actual servers are compared including the "update" field. But the "update" could be updated asynchronously by Nova, without Tempest knowing, causing a mismatchError. This patch exclude the 'update' and 'OS-EXT-STS:power_state' (that can be updated in background) fields from the comparison. Change-Id: I50d1319b690453923b470733e94f3a11fd1cd249 Related-Bug: #1486475 --- tempest/scenario/test_minimum_basic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py index f868382588..a08c89d201 100644 --- a/tempest/scenario/test_minimum_basic.py +++ b/tempest/scenario/test_minimum_basic.py @@ -63,9 +63,12 @@ class TestMinimumBasicScenario(manager.ScenarioTest): def nova_show(self): got_server = self.servers_client.show_server(self.server['id']) + excluded_keys = ['OS-EXT-AZ:availability_zone'] + # Exclude these keys because of LP:#1486475 + excluded_keys.extend(['OS-EXT-STS:power_state', 'updated']) self.assertThat( self.server, custom_matchers.MatchesDictExceptForKeys( - got_server, excluded_keys=['OS-EXT-AZ:availability_zone'])) + got_server, excluded_keys=excluded_keys)) def cinder_create(self): self.volume = self.create_volume()