Fix tempest router timestamp test when HA enabled

When run in an HA or DVR configured environment,
the test_show_router_attribute_with_timestamp API
test can fail with an 'updated_at' timestamp mismatch.

The test should check if the timestamp is >= since
post-creation code could update the object.

Closes-bug: #1679794

Change-Id: I3c58af022d1699ab05ca964b6d957dae39cf1ccc
(cherry picked from commit 9b31b388a8)
This commit is contained in:
Brian Haley 2017-04-04 14:10:12 -04:00 committed by Brian Haley
parent e4aac68900
commit ce81ba1547
1 changed files with 4 additions and 2 deletions

View File

@ -222,8 +222,10 @@ class TestTimeStampWithL3(base_routers.BaseRouterTest):
# verify the timestamp from creation and showed is same
self.assertEqual(router['created_at'],
show_router['created_at'])
self.assertEqual(router['updated_at'],
show_router['updated_at'])
# 'updated_at' timestamp can change immediately after creation
# if environment is HA or DVR, so just make sure it's >=
self.assertGreaterEqual(show_router['updated_at'],
router['updated_at'])
@test.idempotent_id('8ae55186-464f-4b87-1c9f-eb2765ee81ac')
def test_create_floatingip_with_timestamp(self):