Relax volume compare in test_minimum_basic_scenario

Similar to I50d1319b690453923b470733e94f3a11fd1cd249 for
the server that was just created, this change relaxes the
volume compare check on the updated_at field since we can
race between the time the volume was created and when comparing
to the results of GETing the volume that updated_at could have
changed.

Change-Id: Ie666b9ea0e46cf3ee22d07709e5faebafde35325
Closes-Bug: #1838202
This commit is contained in:
Matt Riedemann 2019-10-15 11:39:32 -04:00
parent 1f6a184179
commit 3ec41c20d6
1 changed files with 5 additions and 1 deletions

View File

@ -61,7 +61,11 @@ class TestMinimumBasicScenario(manager.ScenarioTest):
def cinder_show(self, volume):
got_volume = self.volumes_client.show_volume(volume['id'])['volume']
self.assertEqual(volume, got_volume)
# Exclude updated_at because of bug 1838202.
excluded_keys = ['updated_at']
self.assertThat(
volume, custom_matchers.MatchesDictExceptForKeys(
got_volume, excluded_keys=excluded_keys))
def nova_reboot(self, server):
self.servers_client.reboot_server(server['id'], type='SOFT')