Repository navigation
test(axum-http-server): cover private listed HTTP contracts - #2148
josecelano merged 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2148 +/- ##
===========================================
+ Coverage 84.37% 85.08% +0.70%
===========================================
Files 351 351
Lines 28336 29268 +932
Branches 28336 29268 +932
===========================================
+ Hits 23908 24902 +994
+ Misses 4027 3962 -65
- Partials 401 404 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to tests and supporting documentation, add clear contract coverage for an identified gap, and align an existing IPv6 scenario with its stated intent.
Pull request overview
This PR strengthens the packages/axum-http-server integration test suite by adding real-listener contract coverage for the combined private + listed (whitelisted) HTTP tracker configuration, and by correcting an existing “IPv6 external IP” scenario to actually use an IPv6 listener and client.
Changes:
- Add six real-listener integration contracts covering announce/scrape behavior interactions for private+listed mode (auth precedence, whitelist enforcement, and scrape stat visibility rules).
- Fix the “loopback IPv6 client uses external IP” scenario to bind an IPv6 listener and use an IPv6 loopback client, with an environment guard for IPv6 loopback support.
- Add issue-tracking documentation capturing the test inventory/design review and coverage/mutation-testing evidence for #2140.
File summaries
| File | Description |
|---|---|
| packages/axum-http-server/tests/server/v1/contract/for_all_config_modes/receiving_an_announce_request.rs | Corrects the IPv6 external-IP integration scenario to use an IPv6 listener and ::1 client with an IPv6-availability guard. |
| packages/axum-http-server/tests/server/v1/contract/configured_as_private_and_whitelisted.rs | Replaces TODO placeholders with six real-listener contracts for combined private+listed announce/scrape behaviors using a focused scenario fixture. |
| docs/issues/open/2140-1347-review-axum-http-server-integration-tests/test-design-review.md | Adds the integration-test design review writeup and file-by-file inventory backing the selected increments. |
| docs/issues/open/2140-1347-review-axum-http-server-integration-tests/ISSUE.md | Updates the issue spec with links, completed task statuses, and acceptance/verification evidence. |
| docs/issues/open/2140-1347-review-axum-http-server-integration-tests/coverage-evidence.md | Adds reproducible coverage evidence plus a bounded mutation-testing assessment writeup. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
ACK 54aea3e |
Summary
Adds real-listener integration coverage for the private-and-listed HTTP tracker configuration and corrects the IPv6 external-IP scenario so it uses an IPv6 listener and loopback client.
PrivateListedTrackerscenario fixture so each test exposes only its causal state.Verification
cargo test -p torrust-tracker-axum-http-servercargo llvm-cov -p torrust-tracker-axum-http-server --all-features --jsoncargo +nightly fmt --all -- --checklinter allTORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-commit.shCloses #2140