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
diff --git a/neutron/tests/tempest/api/test_timestamp.py b/neutron/tests/tempest/api/test_timestamp.py
index 2abef94..8b57b2d 100644
--- a/neutron/tests/tempest/api/test_timestamp.py
+++ b/neutron/tests/tempest/api/test_timestamp.py
@@ -223,8 +223,10 @@
# 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'])
@decorators.idempotent_id('8ae55186-464f-4b87-1c9f-eb2765ee81ac')
def test_create_floatingip_with_timestamp(self):