1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

AZURE_DNS: Remove artificial delays (#943)

* AZURE_DNS: Remove artificial delays
* CloudflareAPI is too slow for all tests
This commit is contained in:
Tom Limoncelli
2020-11-13 12:21:13 -05:00
committed by GitHub
parent d759b7b4da
commit 184131b1e3
2 changed files with 2 additions and 7 deletions

View File

@ -744,7 +744,8 @@ func makeTests(t *testing.T) []*TestGroup {
// - Gandi: page size is 100, therefore we test with 99, 100, and 101
// - NS1: free acct only allows 50 records, therefore we skip
// - DIGITALOCEAN: page size is 100 (default: 20)
not("NS1"),
// - CLOUDFLAREAPI: Infinite pagesize but due to slow speed, skipping.
not("NS1", "CLOUDFLAREAPI"),
tc("99 records", manyA("rec%04d", "1.2.3.4", 99)...),
tc("100 records", manyA("rec%04d", "1.2.3.4", 100)...),
tc("101 records", manyA("rec%04d", "1.2.3.4", 101)...),

View File

@ -238,8 +238,6 @@ func (a *azurednsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mod
ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second)
defer cancel()
_, err := a.recordsClient.Delete(ctx, *a.resourceGroup, zoneName, *rrset.Name, nativeToRecordType(rrset.Type), "")
// Artificially slow things down after a delete, as the API can take time to register it. The tests fail if we delete and then recheck too quickly.
time.Sleep(10 * time.Millisecond)
if err != nil {
return err
}
@ -270,8 +268,6 @@ func (a *azurednsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mod
ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second)
defer cancel()
_, err := a.recordsClient.Delete(ctx, *a.resourceGroup, zoneName, recordName, existingRecordType, "")
// Artificially slow things down after a delete, as the API can take time to register it. The tests fail if we delete and then recheck too quickly.
time.Sleep(10 * time.Millisecond)
if err != nil {
return err
}
@ -289,8 +285,6 @@ func (a *azurednsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mod
ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second)
defer cancel()
_, err := a.recordsClient.CreateOrUpdate(ctx, *a.resourceGroup, zoneName, recordName, recordType, *rrset, "", "")
// Artificially slow things down after a delete, as the API can take time to register it. The tests fail if we delete and then recheck too quickly.
time.Sleep(10 * time.Millisecond)
if err != nil {
return err
}