Updated and fixed tests using current PowerDNS version#5
Updated and fixed tests using current PowerDNS version#5julego wants to merge 1 commit intolibdns:masterfrom
Conversation
|
I apologize for taking so long to get to this, I kind of forgot this existed. Could you explain a bit about your update to the test? The test works as-is. But if you could push an update to your branch it should kick off a test run, I had goofed on the workflow setup earlier. Again, sorry for taking so long to get to this. |
|
Thanks for your comment and I'm sorry too for the late reply, I need to work again on our internal app using libdns and just re-opened the project. I created a new branch https://github.com/julego/powerdns/tree/failed-test-case based on your last master update. The actual test is to delete a record that is not last in the list. Given this record set: 2.example.org. A 127.0.0.4 The test fails if you try to delete any record other than 127.0.0.7: ❯ PDNS_RUN_INTEGRATION_TEST=1 go test ./...
[...]
--- FAIL: TestPDNSClient/Test_Delete_Zone (0.01s)
client_test.go:285: failed to delete records: unexpected status code 422: http://localhost:8081/api/v1/servers/localhost/zones/example.org. Duplicate record in RRset 2.example.org. IN A with content "127.0.0.4"
--- FAIL: TestPDNSClient/Test_Append_and_Add_Zone (0.02s)
client_test.go:306: assertion failed: have: []string{"1:127.0.0.1", "1:127.0.0.2", "1:127.0.0.3", "2:127.0.0.4", "2:127.0.0.5", "2:127.0.0.6", "2:127.0.0.7", "2:127.0.0.8", "3:127.0.0.9"} want []string{"1:127.0.0.1", "1:127.0.0.2", "1:127.0.0.3", "2:127.0.0.4", "2:127.0.0.6", "2:127.0.0.7", "2:127.0.0.8", "3:127.0.0.9"}I committed a fix in https://github.com/julego/powerdns/tree/fix-remove-records, just a simple patch in removeRecords(). I can create a new pull request too, let me know! |
I updated the tests using the official and current PowerDNS docker image (version 4.7) and fixed a case where DeleteRecords() failed.