Closed fabienmazieres closed 3 weeks ago
@tlimoncelli ,
This bugged me a little bit, the testing suite removed all records except those 2 NS added during TestDualProviders
This little change should leave a perfectly empty zone :)
with a shortened test suite:
# go test -v -provider "ORACLE" -start 0 -end 0
=== RUN TestDNSProviders
=== RUN TestDNSProviders/example.co.uk
=== RUN TestDNSProviders/example.co.uk/Clean_Slate:Empty
=== RUN TestDNSProviders/example.co.uk/00:A:Create_A
=== RUN TestDNSProviders/example.co.uk/00:A:Change_A_target
--- PASS: TestDNSProviders (4.44s)
--- PASS: TestDNSProviders/example.co.uk (2.12s)
--- PASS: TestDNSProviders/example.co.uk/Clean_Slate:Empty (0.25s)
--- PASS: TestDNSProviders/example.co.uk/00:A:Create_A (0.71s)
--- PASS: TestDNSProviders/example.co.uk/00:A:Change_A_target (0.66s)
=== RUN TestDualProviders
integration_test.go:370: Clearing everything
integration_test.go:364: #1:
- DELETE A testa.example.co.uk 3.3.3.3 ttl=300
integration_test.go:377: Adding test nameservers
integration_test.go:364: #1:
+ CREATE NS example.co.uk ns1.example.com. ttl=86400
+ CREATE NS example.co.uk ns2.example.com. ttl=86400
integration_test.go:380: Running again to ensure stability
integration_test.go:396: Removing dummy nameservers
integration_test.go:364: #1:
- DELETE NS example.co.uk ns1.example.com. ttl=86400
- DELETE NS example.co.uk ns2.example.com. ttl=86400
--- PASS: TestDualProviders (1.87s)
=== RUN TestNameserverDots
=== RUN TestNameserverDots/No_trailing_dot_in_nameserver
--- PASS: TestNameserverDots (0.24s)
--- PASS: TestNameserverDots/No_trailing_dot_in_nameserver (0.00s)
PASS
ok github.com/StackExchange/dnscontrol/v4/integrationTest 10.787s
Thanks!
Clean-up NS records after TestDualProviders, it used to leave
ns1.example.com
andns2.example.com
behind