Skip to content

Conversation

@fabikova
Copy link
Contributor

Adds a test for the DNSRecord resource, covering the delegate=false scenario as requested in issue #784.

The test verifies that a DNSRecord (not managed by a DNSPolicy) configured with:

  • spec.delegate: false
  • A direct spec.providerRef pointing to the provider credentials
    can successfully create and publish its DNS entries to the external provider.

The test validates this in two steps:

  1. It checks that the DNSRecord object's status in Kubernetes becomes Ready with the reason ProviderSuccess.
  2. It performs a direct DNS query to confirm the A record is accessible and points to the expected IP address.

@fabikova fabikova force-pushed the feature/issue-784-dns-delegate-test branch 2 times, most recently from 1a41d96 to 048703f Compare November 14, 2025 16:42
@fabikova fabikova requested review from averevki and azgabur November 14, 2025 16:43
@fabikova fabikova moved this to Ready For Review in Kuadrant Nov 18, 2025
@fabikova fabikova force-pushed the feature/issue-784-dns-delegate-test branch from 048703f to 3f27811 Compare December 9, 2025 10:18
@fabikova fabikova changed the title Add test for DNSRecord with delegate=false feat: Add test for DNSRecord with delegate=false Dec 9, 2025
@fabikova fabikova force-pushed the feature/issue-784-dns-delegate-test branch 3 times, most recently from 71cb638 to 56f88be Compare December 9, 2025 10:41
@fabikova fabikova self-assigned this Dec 9, 2025
Comment on lines 47 to 49
@backoff.on_exception(
backoff.fibo, (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer, dns.exception.Timeout), max_time=120
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need backoff here? Your test worked without backoff on all providers for me when I tried

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it works without backoff. I originally added it to prevent potential flaky failures caused by DNS propagation latency, just to ensure the test doesn't fail if resolution lags behind the status update. However, since I haven't seen any failures locally, I'll remove it as you suggested.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Record should be ready when it reports that Provider ensured the dns record. Any irregularities here may be an indication that something doesn't work as intended

+ any extra code slows down the testsuite. We try not to add extra line to cover any possible outcome

Signed-off-by: Martina Fabikova <mfabikov@redhat.com>
@fabikova fabikova force-pushed the feature/issue-784-dns-delegate-test branch from 56f88be to 79c3a81 Compare December 16, 2025 14:31
@fabikova fabikova requested a review from azgabur January 5, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready For Review

Development

Successfully merging this pull request may close these issues.

3 participants