Skip to content

Conversation

@imlonghao
Copy link
Collaborator

Before

=== RUN   TestDNSProviders
Testing Profile="PORKBUN" (TYPE="PORKBUN")
=== RUN   TestDNSProviders/example.com
=== RUN   TestDNSProviders/example.com/Clean_Slate:Empty
    helpers_integration_test.go:169:
        - DELETE example.com SVCB 3 example.com. port="100" ttl=600, porkbun ID: 481371483
=== RUN   TestDNSProviders/example.com/16:Ech:Create_a_HTTPS_record
    helpers_integration_test.go:169:
        + CREATE example.com HTTPS 1 example.com. alpn="h2,h3" ttl=600
=== RUN   TestDNSProviders/example.com/16:Ech:Add_an_ECH_key
    helpers_integration_test.go:169:
        ± MODIFY example.com HTTPS (1 example.com. alpn="h2,h3" ttl=600) -> (1 example.com. alpn="h2,h3" ech="some+base64+encoded+value///" ttl=600), porkbun ID: 481371640
    helpers_integration_test.go:190: Expected 0 corrections on second run, but found 1.
    helpers_integration_test.go:192: UNEXPECTED #0: ± MODIFY example.com HTTPS (1 example.com. alpn="h2,h3" ttl=600) -> (1 example.com. alpn="h2,h3" ech="some+base64+encoded+value///" ttl=600), porkbun ID: 481371640
=== RUN   TestDNSProviders/example.com/Clean_Slate:Empty#01
    helpers_integration_test.go:169:
        - DELETE example.com HTTPS 1 example.com. alpn="h2,h3" ttl=600, porkbun ID: 481371640
=== RUN   TestDNSProviders/example.com/17:SVCB:Create_a_SVCB_record
    helpers_integration_test.go:169:
        + CREATE example.com SVCB 1 test.com. port="80" ttl=600
=== RUN   TestDNSProviders/example.com/17:SVCB:Change_SVCB_priority
    helpers_integration_test.go:169:
        ± MODIFY example.com SVCB (1 test.com. port="80" ttl=600) -> (2 test.com. port="80" ttl=600), porkbun ID: 481371700
=== RUN   TestDNSProviders/example.com/17:SVCB:Change_SVCB_target
    helpers_integration_test.go:169:
        ± MODIFY example.com SVCB (2 test.com. port="80" ttl=600) -> (2 . port="80" ttl=600), porkbun ID: 481371700
=== RUN   TestDNSProviders/example.com/17:SVCB:Change_SVCB_params
    helpers_integration_test.go:169:
        ± MODIFY example.com SVCB (2 . port="80" ttl=600) -> (2 . port="99" ttl=600), porkbun ID: 481371700
=== RUN   TestDNSProviders/example.com/17:SVCB:Change_SVCB_params-empty
    helpers_integration_test.go:169:
        ± MODIFY example.com SVCB (2 . port="99" ttl=600) -> (2 . ttl=600), porkbun ID: 481371700
--- FAIL: TestDNSProviders (75.99s)
    --- FAIL: TestDNSProviders/example.com (75.99s)
        --- PASS: TestDNSProviders/example.com/Clean_Slate:Empty (6.15s)
        --- PASS: TestDNSProviders/example.com/16:Ech:Create_a_HTTPS_record (9.09s)
        --- FAIL: TestDNSProviders/example.com/16:Ech:Add_an_ECH_key (8.53s)
        --- PASS: TestDNSProviders/example.com/Clean_Slate:Empty#01 (5.31s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Create_a_SVCB_record (11.11s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Change_SVCB_priority (8.85s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Change_SVCB_target (9.19s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Change_SVCB_params (8.79s)
        --- FAIL: TestDNSProviders/example.com/17:SVCB:Change_SVCB_params-empty (8.97s)
panic: runtime error: index out of range [2] with length 2 [recovered]
	panic: runtime error: index out of range [2] with length 2

goroutine 98 [running]:
testing.tRunner.func1.2({0x104533dc0, 0x1400079faa0})
	/Users/imlonghao/sdk/go1.23.4/src/testing/testing.go:1632 +0x1bc
testing.tRunner.func1()
	/Users/imlonghao/sdk/go1.23.4/src/testing/testing.go:1635 +0x334
panic({0x104533dc0?, 0x1400079faa0?})
	/Users/imlonghao/sdk/go1.23.4/src/runtime/panic.go:785 +0x124
github.com/StackExchange/dnscontrol/v4/providers/porkbun.toRc({0x1400004000f, 0xa}, 0x1400099a000)
	/Users/imlonghao/Developer/dnscontrol/providers/porkbun/porkbunProvider.go:315 +0x724
github.com/StackExchange/dnscontrol/v4/providers/porkbun.(*porkbunProvider).GetZoneRecords(0x1400025b1c0, {0x1400004000f, 0xa}, 0x14000920c40?)
	/Users/imlonghao/Developer/dnscontrol/providers/porkbun/porkbunProvider.go:229 +0x248
github.com/StackExchange/dnscontrol/v4/pkg/zonerecs.CorrectZoneRecords({0x14c417a98, 0x1400025b1c0}, 0x140009828c0)
	/Users/imlonghao/Developer/dnscontrol/pkg/zonerecs/zonerecords.go:11 +0x48
github.com/StackExchange/dnscontrol/v4/integrationTest.makeChanges.func1(0x140000b2680)
	/Users/imlonghao/Developer/dnscontrol/integrationTest/helpers_integration_test.go:185 +0x864
testing.tRunner(0x140000b2680, 0x140007ec660)
	/Users/imlonghao/sdk/go1.23.4/src/testing/testing.go:1690 +0xe4
created by testing.(*T).Run in goroutine 5
	/Users/imlonghao/sdk/go1.23.4/src/testing/testing.go:1743 +0x314
exit status 2
FAIL	github.com/StackExchange/dnscontrol/v4/integrationTest	76.486s

After

=== RUN   TestDNSProviders
Testing Profile="PORKBUN" (TYPE="PORKBUN")
=== RUN   TestDNSProviders/example.com
=== RUN   TestDNSProviders/example.com/Clean_Slate:Empty
    helpers_integration_test.go:169:
        - DELETE ech.example.com HTTPS 1 example.com. ech="some+base64+encoded+value///" ttl=600, porkbun ID: 481371107
=== RUN   TestDNSProviders/example.com/16:Ech:Create_a_HTTPS_record
    helpers_integration_test.go:169:
        + CREATE example.com HTTPS 1 example.com. alpn="h2,h3" ttl=600
=== RUN   TestDNSProviders/example.com/16:Ech:Add_an_ECH_key
    helpers_integration_test.go:169:
        ± MODIFY example.com HTTPS (1 example.com. alpn="h2,h3" ttl=600) -> (1 example.com. alpn="h2,h3" ech="some+base64+encoded+value///" ttl=600), porkbun ID: 481371236
=== RUN   TestDNSProviders/example.com/16:Ech:Ignore_the_ECH_key_while_changing_other_values
    helpers_integration_test.go:169:
        ± MODIFY example.com HTTPS (1 example.com. alpn="h2,h3" ech="some+base64+encoded+value///" ttl=600) -> (1 example.net. port="80" ech="some+base64+encoded+value///" ttl=600), porkbun ID: 481371236
=== RUN   TestDNSProviders/example.com/16:Ech:Change_the_ECH_key_and_other_values
    helpers_integration_test.go:169:
        ± MODIFY example.com HTTPS (1 example.net. port="80" ech="some+base64+encoded+value///" ttl=600) -> (1 example.org. port="80" ipv4hint="127.0.0.1" ech="another+base64+encoded+value" ttl=600), porkbun ID: 481371236
=== RUN   TestDNSProviders/example.com/16:Ech:Another_domain_with_a_different_ECH_value
    helpers_integration_test.go:169:
        - DELETE example.com HTTPS 1 example.org. port="80" ipv4hint="127.0.0.1" ech="another+base64+encoded+value" ttl=600, porkbun ID: 481371236
    helpers_integration_test.go:169:
        + CREATE ech.example.com HTTPS 1 example.com. ech="some+base64+encoded+value///" ttl=600
=== RUN   TestDNSProviders/example.com/Clean_Slate:Empty#01
    helpers_integration_test.go:169:
        - DELETE ech.example.com HTTPS 1 example.com. ech="some+base64+encoded+value///" ttl=600, porkbun ID: 481371450
=== RUN   TestDNSProviders/example.com/17:SVCB:Create_a_SVCB_record
    helpers_integration_test.go:169:
        + CREATE example.com SVCB 1 test.com. port="80" ttl=600
=== RUN   TestDNSProviders/example.com/17:SVCB:Change_SVCB_priority
    helpers_integration_test.go:169:
        ± MODIFY example.com SVCB (1 test.com. port="80" ttl=600) -> (2 test.com. port="80" ttl=600), porkbun ID: 481371483
=== RUN   TestDNSProviders/example.com/17:SVCB:Change_SVCB_target
    helpers_integration_test.go:169:
        ± MODIFY example.com SVCB (2 test.com. port="80" ttl=600) -> (2 . port="80" ttl=600), porkbun ID: 481371483
=== RUN   TestDNSProviders/example.com/17:SVCB:Change_SVCB_params
    helpers_integration_test.go:169:
        ± MODIFY example.com SVCB (2 . port="80" ttl=600) -> (2 . port="99" ttl=600), porkbun ID: 481371483
=== RUN   TestDNSProviders/example.com/17:SVCB:Change_SVCB_params-empty
    helpers_integration_test.go:169:
        ± MODIFY example.com SVCB (2 . port="99" ttl=600) -> (2 . ttl=600), porkbun ID: 481371483
=== RUN   TestDNSProviders/example.com/17:SVCB:Change_SVCB_all
    helpers_integration_test.go:169:
        ± MODIFY example.com SVCB (2 . ttl=600) -> (3 example.com. port="100" ttl=600), porkbun ID: 481371483
--- PASS: TestDNSProviders (149.62s)
    --- PASS: TestDNSProviders/example.com (149.62s)
        --- PASS: TestDNSProviders/example.com/Clean_Slate:Empty (6.85s)
        --- PASS: TestDNSProviders/example.com/16:Ech:Create_a_HTTPS_record (8.92s)
        --- PASS: TestDNSProviders/example.com/16:Ech:Add_an_ECH_key (36.77s)
        --- PASS: TestDNSProviders/example.com/16:Ech:Ignore_the_ECH_key_while_changing_other_values (14.44s)
        --- PASS: TestDNSProviders/example.com/16:Ech:Change_the_ECH_key_and_other_values (9.06s)
        --- PASS: TestDNSProviders/example.com/16:Ech:Another_domain_with_a_different_ECH_value (12.26s)
        --- PASS: TestDNSProviders/example.com/Clean_Slate:Empty#01 (5.45s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Create_a_SVCB_record (8.56s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Change_SVCB_priority (9.34s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Change_SVCB_target (9.24s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Change_SVCB_params (8.78s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Change_SVCB_params-empty (9.49s)
        --- PASS: TestDNSProviders/example.com/17:SVCB:Change_SVCB_all (10.47s)
PASS
ok  	github.com/StackExchange/dnscontrol/v4/integrationTest	150.053s

@tlimoncelli
Copy link
Collaborator

Thanks for fixing this!

@tlimoncelli tlimoncelli merged commit 4672409 into StackExchange:main Jul 8, 2025
4 checks passed
@imlonghao imlonghao deleted the fix/porkbun-svcb branch July 8, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants