mirror of
https://github.com/VinylDNS/vinyldns
synced 2025-08-30 22:05:21 +00:00
remove wait_until_zone_exists helper (#620)
This commit is contained in:
@@ -1813,7 +1813,7 @@ def test_ipv4_ptr_record_when_zone_discovery_only_finds_mismatched_delegated_zon
|
||||
# re-create classless base zone and update zone info in shared_zone_test_context for use in future tests
|
||||
zone_create_change = ok_client.create_zone(shared_zone_test_context.classless_base_zone_json, status=202)
|
||||
shared_zone_test_context.classless_base_zone = zone_create_change['zone']
|
||||
ok_client.wait_until_zone_exists(zone_create_change)
|
||||
ok_client.wait_until_zone_active(zone_create_change[u'zone'][u'id'])
|
||||
|
||||
def test_ipv4_ptr_recordtype_update_delete_checks(shared_zone_test_context):
|
||||
"""
|
||||
|
@@ -106,7 +106,7 @@ def test_delete_admin_group(shared_zone_test_context):
|
||||
|
||||
result = client.create_zone(zone, status=202)
|
||||
result_zone = result['zone']
|
||||
client.wait_until_zone_exists(result)
|
||||
client.wait_until_zone_active(result[u'zone'][u'id'])
|
||||
|
||||
client.delete_group(result_group['id'], status=400)
|
||||
|
||||
|
@@ -279,16 +279,16 @@ class SharedZoneTestContext(object):
|
||||
self.non_test_shared_zone = non_test_shared_zone_change['zone']
|
||||
|
||||
# wait until our zones are created
|
||||
self.ok_vinyldns_client.wait_until_zone_exists(system_test_zone_change)
|
||||
self.ok_vinyldns_client.wait_until_zone_exists(ok_zone_change)
|
||||
self.dummy_vinyldns_client.wait_until_zone_exists(dummy_zone_change)
|
||||
self.ok_vinyldns_client.wait_until_zone_exists(ip6_reverse_zone_change)
|
||||
self.ok_vinyldns_client.wait_until_zone_exists(ip4_reverse_zone_change)
|
||||
self.ok_vinyldns_client.wait_until_zone_exists(classless_base_zone_change)
|
||||
self.ok_vinyldns_client.wait_until_zone_exists(classless_zone_delegation_change)
|
||||
self.ok_vinyldns_client.wait_until_zone_exists(system_test_zone_change)
|
||||
self.ok_vinyldns_client.wait_until_zone_exists(parent_zone_change)
|
||||
self.ok_vinyldns_client.wait_until_zone_exists(ds_zone_change)
|
||||
self.ok_vinyldns_client.wait_until_zone_active(system_test_zone_change[u'zone'][u'id'])
|
||||
self.ok_vinyldns_client.wait_until_zone_active(ok_zone_change[u'zone'][u'id'])
|
||||
self.dummy_vinyldns_client.wait_until_zone_active(dummy_zone_change[u'zone'][u'id'])
|
||||
self.ok_vinyldns_client.wait_until_zone_active(ip6_reverse_zone_change[u'zone'][u'id'])
|
||||
self.ok_vinyldns_client.wait_until_zone_active(ip4_reverse_zone_change[u'zone'][u'id'])
|
||||
self.ok_vinyldns_client.wait_until_zone_active(classless_base_zone_change[u'zone'][u'id'])
|
||||
self.ok_vinyldns_client.wait_until_zone_active(classless_zone_delegation_change[u'zone'][u'id'])
|
||||
self.ok_vinyldns_client.wait_until_zone_active(system_test_zone_change[u'zone'][u'id'])
|
||||
self.ok_vinyldns_client.wait_until_zone_active(parent_zone_change[u'zone'][u'id'])
|
||||
self.ok_vinyldns_client.wait_until_zone_active(ds_zone_change[u'zone'][u'id'])
|
||||
self.shared_zone_vinyldns_client.wait_until_zone_change_status_synced(shared_zone_change)
|
||||
shared_sync_change = self.shared_zone_vinyldns_client.sync_zone(self.shared_zone['id'])
|
||||
self.shared_zone_vinyldns_client.wait_until_zone_change_status_synced(non_test_shared_zone_change)
|
||||
|
@@ -54,7 +54,7 @@ class ZoneHistoryContext(object):
|
||||
}, status=202)
|
||||
self.zone = zone_change['zone']
|
||||
|
||||
self.client.wait_until_zone_exists(zone_change)
|
||||
self.client.wait_until_zone_active(zone_change[u'zone'][u'id'])
|
||||
|
||||
# change the zone nine times to we have update events in zone change history, ten total changes including creation
|
||||
for i in range(2,11):
|
||||
|
@@ -102,7 +102,7 @@ def test_create_zone_without_transfer_connection_leaves_it_empty(shared_zone_tes
|
||||
}
|
||||
result = client.create_zone(zone, status=202)
|
||||
result_zone = result['zone']
|
||||
client.wait_until_zone_exists(result)
|
||||
client.wait_until_zone_active(result[u'zone'][u'id'])
|
||||
|
||||
get_result = client.get_zone(result_zone['id'])
|
||||
|
||||
@@ -224,7 +224,7 @@ def test_create_zone_no_connection_uses_defaults(shared_zone_test_context):
|
||||
try:
|
||||
zone_change = client.create_zone(zone, status=202)
|
||||
zone = zone_change['zone']
|
||||
client.wait_until_zone_exists(zone_change)
|
||||
client.wait_until_zone_active(zone_change[u'zone'][u'id'])
|
||||
|
||||
# Check response from create
|
||||
assert_that(zone['name'], is_(zone_name+'.'))
|
||||
@@ -278,7 +278,7 @@ def test_zone_connection_only(shared_zone_test_context):
|
||||
try:
|
||||
zone_change = client.create_zone(zone, status=202)
|
||||
zone = zone_change['zone']
|
||||
client.wait_until_zone_exists(zone_change)
|
||||
client.wait_until_zone_active(zone_change[u'zone'][u'id'])
|
||||
|
||||
# Check response from create
|
||||
assert_that(zone['name'], is_(zone_name+'.'))
|
||||
@@ -384,7 +384,7 @@ def test_zone_transfer_connection(shared_zone_test_context):
|
||||
try:
|
||||
zone_change = client.create_zone(zone, status=202)
|
||||
zone = zone_change['zone']
|
||||
client.wait_until_zone_exists(zone_change)
|
||||
client.wait_until_zone_active(zone_change[u'zone'][u'id'])
|
||||
|
||||
# Check response from create
|
||||
assert_that(zone['name'], is_(zone_name+'.'))
|
||||
|
@@ -82,7 +82,7 @@ class ListZonesTestContext(object):
|
||||
self.zone_ids = [self.search_zone_1['id'], self.search_zone_2['id'], self.search_zone_3['id'], self.non_search_zone_1['id'], self.non_search_zone_2['id']]
|
||||
zone_changes = [search_zone_1_change, search_zone_2_change, search_zone_3_change, non_search_zone_1_change, non_search_zone_2_change]
|
||||
for change in zone_changes:
|
||||
self.client.wait_until_zone_exists(change)
|
||||
self.client.wait_until_zone_active(change[u'zone'][u'id'])
|
||||
except:
|
||||
# teardown if there was any issue in setup
|
||||
try:
|
||||
|
@@ -136,7 +136,7 @@ def test_update_missing_zone_data(shared_zone_test_context):
|
||||
}
|
||||
result = client.create_zone(zone, status=202)
|
||||
result_zone = result['zone']
|
||||
client.wait_until_zone_exists(result)
|
||||
client.wait_until_zone_active(result[u'zone'][u'id'])
|
||||
|
||||
update_zone = {
|
||||
'id': result_zone['id'],
|
||||
@@ -186,7 +186,7 @@ def test_update_invalid_zone_data(shared_zone_test_context):
|
||||
}
|
||||
result = client.create_zone(zone, status=202)
|
||||
result_zone = result['zone']
|
||||
client.wait_until_zone_exists(result)
|
||||
client.wait_until_zone_active(result[u'zone'][u'id'])
|
||||
|
||||
update_zone = {
|
||||
'id': result_zone['id'],
|
||||
@@ -720,7 +720,7 @@ def test_user_can_update_zone_to_another_admin_group(shared_zone_test_context):
|
||||
}, status=202
|
||||
)
|
||||
zone = result['zone']
|
||||
client.wait_until_zone_exists(result)
|
||||
client.wait_until_zone_active(result[u'zone'][u'id'])
|
||||
|
||||
import json
|
||||
print json.dumps(zone, indent=3)
|
||||
|
@@ -40,7 +40,7 @@ def test_sync_zone_success():
|
||||
}
|
||||
zone_change = client.create_zone(zone, status=202)
|
||||
zone = zone_change['zone']
|
||||
client.wait_until_zone_exists(zone_change)
|
||||
client.wait_until_zone_active(zone_change[u'zone'][u'id'])
|
||||
|
||||
zone_id = zone['id']
|
||||
|
||||
|
@@ -728,13 +728,6 @@ class VinylDNSClient(object):
|
||||
|
||||
assert_that(response, is_(404))
|
||||
|
||||
#TODO Replace calls to this method with wait_until_zone_active and remove
|
||||
def wait_until_zone_exists(self, zone_change, **kwargs):
|
||||
"""
|
||||
Shim method to invoke wait_until_zone_active
|
||||
"""
|
||||
self.wait_until_zone_active(zone_change[u'zone'][u'id'])
|
||||
|
||||
def wait_until_zone_active(self, zone_id):
|
||||
"""
|
||||
Waits a period of time for the zone sync to complete.
|
||||
|
Reference in New Issue
Block a user