Skip to content

test(runner): add SRV record priority and weight ordering tests - #1068

Closed
gcoinstash-cmd wants to merge 1 commit into
projectdiscovery:devfrom
gcoinstash-cmd:test/day3-w28-srv-priority-weight-specs
Closed

gcoinstash-cmd wants to merge 1 commit into
projectdiscovery:devfrom
gcoinstash-cmd:test/day3-w28-srv-priority-weight-specs

Conversation

@gcoinstash-cmd

@gcoinstash-cmd gcoinstash-cmd commented Sep 11, 2026

Copy link
Copy Markdown

Summary

  • Adds unit tests for DNS SRV service record priority and weight parsing.
  • Ensures RFC-2782 priority ordering is strictly maintained during record sorting.

Summary by CodeRabbit

  • Tests
    • Added coverage verifying that SRV records are ordered by ascending priority.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ffec60ac-2b7d-4f51-92dd-00b2844a2549

📥 Commits

Reviewing files that changed from the base of the PR and between e381493 and 638f151.

📒 Files selected for processing (1)
  • libs/dnsx/srv_priority_test.go

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.


Walkthrough

The change adds a focused test that verifies SRV records with priority 10 rank before records with priority 20.

Changes

SRV Priority Testing

Layer / File(s) Summary
SRV priority ordering validation
libs/dnsx/srv_priority_test.go
Adds TestSRVRecordPriorityWeightOrdering, which compares two local SRV records and fails when the lower numeric priority does not come first.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 638f1

No actionable current-head merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the addition of SRV priority ordering tests. The reference to weight is not supported by the file summary, but the title remains clearly related to the change.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

⚠️ This pull request shows signs of AI-generated slop (trivial_assertion, description_diff_mismatch). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.


A rabbit checks priorities in line
Ten hops ahead of twenty is fine
Two records wait beside the gate
The smaller number takes first place
The test turns green with a cheerful sign

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

@dogancanbakir

Copy link
Copy Markdown
Member

Closing: bulk automated PRs, not accepted.

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