Skip to content

USHIFT-6909: Add RF tests for custom DNS config#6944

Open
kasturinarra wants to merge 1 commit into
openshift:mainfrom
kasturinarra:dns-custom-config-tests
Open

USHIFT-6909: Add RF tests for custom DNS config#6944
kasturinarra wants to merge 1 commit into
openshift:mainfrom
kasturinarra:dns-custom-config-tests

Conversation

@kasturinarra

@kasturinarra kasturinarra commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Strengthened validation for custom DNS Corefile updates, including atomic replacements and correct removal of both the main Corefile and its temporary file.
    • Added multi-zone DNS coverage to ensure private host records and cluster-local DNS resolution work together.
    • Confirmed DNS configuration reporting now reflects the configured custom Corefile path, and that updates apply without requiring a restart.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 25, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 25, 2026

Copy link
Copy Markdown

@kasturinarra: This pull request references USHIFT-6909 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 1ab8e8b7-c154-4d7e-85a8-5ec58f26cbef

📥 Commits

Reviewing files that changed from the base of the PR and between 37bc3ee and ec968b5.

📒 Files selected for processing (2)
  • test/assets/dns/Corefile-multizone.template
  • test/suites/standard2/dns-custom-config.robot
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/suites/standard2/dns-custom-config.robot

Walkthrough

The DNS custom config suite adds multi-zone Corefile support, helper keywords for applying that config, and tests covering atomic Corefile replacement and multi-zone DNS resolution.

Changes

DNS custom Corefile test coverage

Layer / File(s) Summary
Multizone Corefile template
test/assets/dns/Corefile-multizone.template
Adds a CoreDNS template with a custom host zone and a default Kubernetes-backed zone.
Suite variables and helpers
test/suites/standard2/dns-custom-config.robot
Adds multi-zone template variables, updates custom Corefile cleanup, and introduces keywords to build and apply the multi-zone Corefile.
DNS validation test cases
test/suites/standard2/dns-custom-config.robot
Adds tests for atomic Corefile replacement and multi-zone DNS resolution, including the effective dns.configFile assertion.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning New tests hardcode IPv4 addresses (99.99.99.98, 127.0.0.1) with no IP-family detection or IPv6 fallback. Run the IPv6 e2e job and make the test IP-family-aware; avoid IPv4-only literals or add ::1/IPv6 alternatives.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding Robot Framework tests for custom DNS configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The changed test titles are static/descriptive; no dynamic values appear in any test case name, and no Ginkgo titles were added.
Test Structure And Quality ✅ Passed No Ginkgo tests were touched; the PR only adds Robot DNS suites with per-test setup/teardown and bounded waits, so this check is not applicable.
Microshift Test Compatibility ✅ Passed Only robot DNS tests were added; they use existing openshift-ingress/openshift-dns patterns already present elsewhere and no unsupported MicroShift APIs or HA assumptions.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; this PR only changes Robot Framework DNS tests/templates, with no multi-node or HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Only DNS test files and a Corefile template changed; no manifests, controllers, replicas, affinity, node selectors, or PDBs were introduced.
Ote Binary Stdout Contract ✅ Passed PR only adds Robot tests and a CoreDNS template; no process-level Go entrypoints or stdout writes were introduced.
No-Weak-Crypto ✅ Passed No weak crypto primitives, custom crypto, or secret/token comparisons appear in the modified Robot test and Corefile template files.
Container-Privileges ✅ Passed No privileged/root/securityContext settings appear in the touched files; the changes are Robot tests plus a CoreDNS Corefile template, not container manifests.
No-Sensitive-Data-In-Logs ✅ Passed No new logging of secrets/PII was added; the PR only adds DNS test assertions and benign journal checks, with no password/token/customer-data output.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@kasturinarra kasturinarra force-pushed the dns-custom-config-tests branch from 37bc3ee to ec968b5 Compare June 25, 2026 17:59
@openshift-ci openshift-ci Bot requested review from ggiguash and vanhalenar June 25, 2026 18:00
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kasturinarra

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/suites/standard2/dns-custom-config.robot`:
- Around line 78-85: The DNS custom config test only verifies that the new
hostname appears, so it can miss cases where the old Corefile content is
incorrectly preserved. Update the test around Resolve Host From Pod, Build
Custom Corefile, and ConfigMap Should Contain Hostname to also assert
replacement semantics by checking that ${HOSTNAME} is no longer present in the
ConfigMap or no longer resolves after the update, while still confirming
${new_hostname} is present and resolvable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: bf29bf11-3a5c-4972-a27c-bcab400fae93

📥 Commits

Reviewing files that changed from the base of the PR and between c3b0b39 and 37bc3ee.

📒 Files selected for processing (1)
  • test/suites/standard2/dns-custom-config.robot

Comment thread test/suites/standard2/dns-custom-config.robot
@kasturinarra

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@kasturinarra: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-tests ec968b5 link true /test e2e-aws-tests
ci/prow/e2e-aws-tests-arm ec968b5 link true /test e2e-aws-tests-arm
ci/prow/e2e-aws-tests-bootc-arm-el9 ec968b5 link true /test e2e-aws-tests-bootc-arm-el9
ci/prow/e2e-aws-tests-bootc-el9 ec968b5 link true /test e2e-aws-tests-bootc-el9

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants