Add status='ACTIVE' when using changes-since as filter
updated_at field may haven't been set at the point in the boot
process where build_request still exists, so filter by
{'changes-since': '2051-01-01T12:34:00Z'} may get server that is
"at the point in the boot process where build_request still exists",
and so the testcase may accidentally fail if there are other
testcases running at same time with pre-provisoned credentials.
This is to add status='ACTIVE' along with changes-since as filter.
Change-Id: Ieb0fd67ac9d691b53c1275166bdb0395d1570662
diff --git a/tempest/api/compute/servers/test_list_servers_negative.py b/tempest/api/compute/servers/test_list_servers_negative.py
index 6c9b287..393e68f 100644
--- a/tempest/api/compute/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/servers/test_list_servers_negative.py
@@ -119,8 +119,12 @@
@decorators.attr(type=['negative'])
@decorators.idempotent_id('74745ad8-b346-45b5-b9b8-509d7447fc1f')
def test_list_servers_by_changes_since_future_date(self):
- # Return an empty list when a date in the future is passed
- changes_since = {'changes-since': '2051-01-01T12:34:00Z'}
+ # Return an empty list when a date in the future is passed.
+ # updated_at field may haven't been set at the point in the boot
+ # process where build_request still exists, so add
+ # {'status': 'ACTIVE'} along with changes-since as filter.
+ changes_since = {'changes-since': '2051-01-01T12:34:00Z',
+ 'status': 'ACTIVE'}
body = self.client.list_servers(**changes_since)
self.assertEmpty(body['servers'])