Adding new test cases to "quota" scenario test suite
1) test_api_export_size_quota
Verifies: "Number of recordsets allowed in a zone export"
2) test_recordset_records_quota
Verifies: "Number of records allowed per recordset"
3) test_zone_records_quota
Verifies: "Number of records allowed per zone"
4) test_zone_recordsets_quota
Verifies: "Number of records allowed per recordset"
5) test_zones_quota (modify)
Verifies: "The number of zone allowed per project"
Change-Id: Ia89091087f004e174f38ca0685605057abbf5cdd
diff --git a/designate_tempest_plugin/common/waiters.py b/designate_tempest_plugin/common/waiters.py
index a606fda..affe332 100644
--- a/designate_tempest_plugin/common/waiters.py
+++ b/designate_tempest_plugin/common/waiters.py
@@ -33,7 +33,7 @@
time.sleep(client.build_interval)
try:
- _, zone = client.show_zone(zone_id)
+ zone = client.show_zone(zone_id)[1]
except lib_exc.NotFound:
LOG.info('Zone %s is 404ing', zone_id)
return
@@ -62,12 +62,12 @@
"""Waits for a zone to reach given status."""
LOG.info('Waiting for zone %s to reach %s', zone_id, status)
- _, zone = client.show_zone(zone_id, headers=headers)
+ zone = client.show_zone(zone_id, headers=headers)[1]
start = int(time.time())
while zone['status'] != status:
time.sleep(client.build_interval)
- _, zone = client.show_zone(zone_id, headers=headers)
+ zone = client.show_zone(zone_id, headers=headers)[1]
status_curr = zone['status']
if status_curr == status:
LOG.info('Zone %s reached %s', zone_id, status)
@@ -98,12 +98,12 @@
"""Waits for an imported zone to reach the given status."""
LOG.info('Waiting for zone import %s to reach %s', zone_import_id, status)
- _, zone_import = client.show_zone_import(zone_import_id)
+ zone_import = client.show_zone_import(zone_import_id)[1]
start = int(time.time())
while zone_import['status'] != status:
time.sleep(client.build_interval)
- _, zone_import = client.show_zone_import(zone_import_id)
+ zone_import = client.show_zone_import(zone_import_id)[1]
status_curr = zone_import['status']
if status_curr == status:
LOG.info('Zone import %s reached %s', zone_import_id, status)
@@ -131,16 +131,17 @@
raise lib_exc.TimeoutException(message)
-def wait_for_zone_export_status(client, zone_export_id, status):
+def wait_for_zone_export_status(client, zone_export_id, status, headers=None):
"""Waits for an exported zone to reach the given status."""
LOG.info('Waiting for zone export %s to reach %s', zone_export_id, status)
- _, zone_export = client.show_zone_export(zone_export_id)
+ zone_export = client.show_zone_export(zone_export_id, headers=headers)[1]
start = int(time.time())
while zone_export['status'] != status:
time.sleep(client.build_interval)
- _, zone_export = client.show_zone_export(zone_export_id)
+ zone_export = client.show_zone_export(
+ zone_export_id, headers=headers)[1]
status_curr = zone_export['status']
if status_curr == status:
LOG.info('Zone export %s reached %s', zone_export_id, status)
@@ -168,17 +169,20 @@
raise lib_exc.TimeoutException(message)
-def wait_for_recordset_status(client, zone_id, recordset_id, status):
+def wait_for_recordset_status(
+ client, zone_id, recordset_id, status, headers=None):
"""Waits for a recordset to reach the given status."""
LOG.info('Waiting for recordset %s to reach %s',
recordset_id, status)
- _, recordset = client.show_recordset(zone_id, recordset_id)
+ recordset = client.show_recordset(
+ zone_id, recordset_id, headers=headers)[1]
start = int(time.time())
while recordset['status'] != status:
time.sleep(client.build_interval)
- _, recordset = client.show_recordset(zone_id, recordset_id)
+ recordset = client.show_recordset(
+ zone_id, recordset_id, headers=headers)[1]
status_curr = recordset['status']
if status_curr == status:
LOG.info('Recordset %s reached %s', recordset_id, status)