Skip to content

TESTING: Clean-up records after TestDualProviders#3171

Merged
tlimoncelli merged 1 commit into
DNSControl:mainfrom
fabienmazieres:clean-after-TestDualProviders
Oct 28, 2024
Merged

TESTING: Clean-up records after TestDualProviders#3171
tlimoncelli merged 1 commit into
DNSControl:mainfrom
fabienmazieres:clean-after-TestDualProviders

Conversation

@fabienmazieres
Copy link
Copy Markdown
Contributor

Clean-up NS records after TestDualProviders, it used to leave ns1.example.com and ns2.example.com behind

@fabienmazieres
Copy link
Copy Markdown
Contributor Author

@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 :)

@fabienmazieres
Copy link
Copy Markdown
Contributor Author

fabienmazieres commented Oct 25, 2024

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

@tlimoncelli
Copy link
Copy Markdown
Contributor

Thanks!

@tlimoncelli tlimoncelli merged commit 1edde62 into DNSControl:main Oct 28, 2024
@tlimoncelli tlimoncelli changed the title Clean-up records after TestDualProviders TESTING: Clean-up records after TestDualProviders Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants