Skip to content

Conversation

@AndrianBdn
Copy link
Collaborator

This PR adds Route53-specific tests using the new libdnstest package, which is now part of libdns (alpha)

Additionally it fixes multiple bugs discovered during testing.

The main issue was Route53's ResourceRecordSet model - it groups records by name+type, while libdns treats each record individually. Fixed by rewriting AppendRecords and DeleteRecords to properly handle grouping.

Other fixes:

  • deleteRecord wasn't populating resourceRecords for non-TXT types
  • parseRecordSet now returns typed records via libdns.Parse()
  • Record names converted to relative format (zone apex uses "@")
  • Added proper error returns instead of silent failures

Testing now covers all DNS record types. Examples updated to use command-line arguments.

Updated libdns to v1.1.1 throughout. Tests currently rely on a custom go.mod in the libdnstest directory until the package is released in a stable version.

Added libdnstest framework to Route53 provider and fixed multiple bugs
discovered during testing.

The main issue was Route53's ResourceRecordSet model - it groups records
by name+type, while libdns treats each record individually. Fixed by
rewriting AppendRecords and DeleteRecords to properly handle grouping.

Other fixes:
- deleteRecord wasn't populating resourceRecords for non-TXT types
- parseRecordSet now returns typed records via libdns.Parse()
- Record names converted to relative format (zone apex uses "@")
- Added proper error returns instead of silent failures

Testing now covers all DNS record types. Examples updated to use
command-line arguments and show typed structs in output.

Updated libdns to v1.1.1 throughout.
@mholt
Copy link

mholt commented Sep 22, 2025

This looks great, thank you!

Could we make you a collaborator on the repository, and then you can merge and push at will?

@AndrianBdn
Copy link
Collaborator Author

@mholt thanks for taking a look! Yes, this repository is very quiet and I can find some time to work on it.

@mholt
Copy link

mholt commented Sep 23, 2025

Sounds good, thank you! I've added you as a collaborator. I don't use Route53 myself, so feel free to merge when you're ready.

@AndrianBdn AndrianBdn merged commit cb59d92 into libdns:master Sep 24, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants