Support configurable TXT record length via TEST_DNS_TXT_LEN (improved acme-dns compatibility) #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for a configurable TXT record length during DNS API testing.
Some DNS systems—such as acme-dns—require TXT values of an exact length (e.g., 43 characters). Until now, acmetest always generated TXT records with a fixed size, making it impossible to properly test systems with strict length requirements.
This change introduces a flexible mechanism that allows the TXT size to be adjusted via a GitHub secret (
TEST_DNS_TXT_LEN), while still keeping a safe default.What This PR Changes
1. Adds optional
TEST_DNS_TXT_LENsecret2. TXT values are generated from a truly random source
/dev/urandomoropenssl randdepending on platform3. The setting is propagated to all test environments
Including:
Every environment behaves consistently with the same TXT length configuration.
Why This Is Useful
The primary motivation is better compatibility with acme-dns, which requires TXT values of a specific length.
This PR makes it possible to:
Backward Compatibility
TEST_DNS_TXT_LENis not provided, acmetest defaults to 43 charactersSummary
This PR introduces optional configurability for TXT record length in DNS API testing, enabling proper support for acme-dns and other systems that may require fixed-length TXT values.
It preserves compatibility with existing workflows while giving maintainers and developers more control over test behavior.
fixes: #33