diff --git a/Cargo.lock b/Cargo.lock index 0cdb9d2731..bb236a3741 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5199,7 +5199,6 @@ dependencies = [ "tokio-util", "torrust-clock", "torrust-info-hash", - "torrust-located-error", "torrust-metrics", "torrust-tracker-configuration", "torrust-tracker-core", diff --git a/cspell.json b/cspell.json index 2f114e0840..aa1b28ec93 100644 --- a/cspell.json +++ b/cspell.json @@ -25,6 +25,7 @@ "packages/tracker-core/docs/benchmarking/machine/*.txt", "docs/issues/*/2850-non-negative-number-of-bytes/evidence/*.txt", "docs/issues/*/2915-2912-si-3-http-tracker-request-errors/evidence/*.txt", + "docs/issues/*/2916-2912-si-4-tracker-core/evidence/*.txt", ".github/labels.json", "/project-words.txt", "repomix-output.xml", diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/ISSUE.md b/docs/issues/open/2916-2912-si-4-tracker-core/ISSUE.md index 0695e8265a..cd21b25b07 100644 --- a/docs/issues/open/2916-2912-si-4-tracker-core/ISSUE.md +++ b/docs/issues/open/2916-2912-si-4-tracker-core/ISSUE.md @@ -2,14 +2,14 @@ schema-version: 1 doc-type: issue issue-type: bug -status: planned +status: in-progress priority: p1 epic: 2912 github-issue: 2916 spec-path: docs/issues/open/2916-2912-si-4-tracker-core/ISSUE.md branch: "2916-tracker-core" -related-pr: null -last-updated-utc: "2026-11-18 19:11" +related-pr: 2991 +last-updated-utc: "2026-11-21 15:42" semantic-links: skill-links: - create-issue @@ -147,13 +147,13 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Status | Task | Notes / Expected Output | | --- | --- | --- | --- | -| T1 | TODO | Reproduce and record | UDP, HTTP and REST replies with a library path, in `manual-verification-evidence.md`. | -| T2 | TODO | Red tests | Unit tests for the 7 variants and the `PeerKeyError`/database sources; protocol tests for UDP, HTTP and REST; red output recorded. | -| T3 | TODO | Whitelist and key errors | `location` removed from `WhitelistError` and `authentication::key::Error` and their sites, including `http-core`. | -| T4 | TODO | Database errors | `location` removed from the three variants and 12 driver sites; `LocatedError` sources replaced; `tracing` event added where needed. | -| T5 | TODO | `PeerKeyError` sources and dependency | Plain sources; six `Located(..).into()` removed; `torrust-located-error` removed from `tracker-core/Cargo.toml`. | -| T6 | TODO | Consumers | `udp-core`, `udp-server`, `http-core`, `rest-api-runtime-adapter` compile and their tests are updated. | -| T7 | TODO | Green and recheck | Green output, then the T1 requests repeated against the running tracker. | +| T1 | DONE | Reproduce and record | UDP, HTTP and REST replies with a library path, in `manual-verification-evidence.md`. | +| T2 | DONE | Red tests | Unit tests for the 7 variants and the `PeerKeyError`/database sources; protocol tests for UDP, HTTP and REST; red output recorded. | +| T3 | DONE | Whitelist and key errors | `location` removed from `WhitelistError` and `authentication::key::Error` and their sites, including `http-core`. | +| T4 | DONE | Database errors | `location` removed from the three variants and 12 driver sites; `LocatedError` sources replaced; `tracing` event added where needed. | +| T5 | DONE | `PeerKeyError` sources and dependency | Plain sources; six `Located(..).into()` removed; `torrust-located-error` removed from `tracker-core/Cargo.toml`. | +| T6 | DONE | Consumers | `udp-core`, `udp-server`, `http-core`, `rest-api-runtime-adapter` compile and their tests are updated. | +| T7 | DONE | Green and recheck | Green output, then the T1 requests repeated against the running tracker. | ## Commit Points @@ -192,11 +192,11 @@ with the narrow affected scope, and sign every commit with GPG. - [x] Spec reviewed and approved by user/maintainer - [x] GitHub issue created and issue number added to this spec - [ ] (Optional, recommended for complex issues) Spec-only PR merged into `develop` before implementation -- [ ] Implementation completed +- [x] Implementation completed - [ ] Automatic verification completed (`linter all`, relevant tests, and any pre-push checks) -- [ ] Manual verification scenarios executed and recorded in issue-local `manual-verification-evidence.md` -- [ ] Acceptance criteria reviewed after implementation and updated with evidence -- [ ] Evidence-based implementation completion review recorded: issue-local retrospective created for material discoveries, or progress log states why none was needed +- [x] Manual verification scenarios executed and recorded in issue-local `manual-verification-evidence.md` +- [x] Acceptance criteria reviewed after implementation and updated with evidence +- [x] Evidence-based implementation completion review recorded: issue-local retrospective created for material discoveries, or progress log states why none was needed - [ ] Reviewer validated acceptance criteria and updated checkboxes - [ ] Independent reviewer reports recorded in issue-local `agent-review-reports.md` when reviewers received this folder-style specification - [ ] Committer verified spec progress is up to date before commit @@ -210,19 +210,27 @@ the model that produced them. - 2026-11-11 17:05 UTC - Claude Code (Fable 5.2) - Drafted from the audit of issue #2804 (`docs/issues/open/2804-location-caller-track-caller-audit/inventory.md`, `options.md`) as a sub-issue of the EPIC draft. Not yet approved; line numbers are those of `develop` at `4f0af379a` and must be re-checked before implementation. - 2026-11-17 17:30 UTC - Claude Code (Claude Opus 5.5) - EPIC coordinator: the maintainer approved the specification on 2026-11-17; issue #2916 created as `josecelano-bot` and the specification moved from `docs/issues/drafts/` to `docs/issues/open/` (SI-4 of EPIC #2912). +- 2026-11-21 13:31 UTC - Claude Code (Claude Opus 5.5) - T1: reproduced on `develop` at `4be22ee66` with a listed and a private tracker (UDP, HTTP and REST replies all hold `packages/...rs:line` paths; a duplicate key over REST holds two, from the driver and from `authentication/handler.rs`). T2: red tests added at the tracker-core seams (whitelist authorization, authentication service, the shared driver tests, the keys handler) and at the protocol servers (UDP contract, HTTP `failure_reasons_hold_no_source_path.rs`, REST `assert_unhandled_rejection`, which now also forbids source paths), and the `ErrorKind::Whitelist` payload tests in `udp-server/src/event.rs` pinned to the full message. Decisions pending for T3 to T5 are recorded when made. +- 2026-11-21 13:34 UTC - Claude Code (Claude Opus 5.5) - T2: red run at `test(tracker-core): [#2916] add red tests that tracker-core error texts name no source path`, all new and changed tests fail with a `packages/...rs:line` path (output in `evidence/`). T3: `location` removed from `WhitelistError::TorrentNotWhitelisted` and `authentication::key::Error::{UnableToReadKey, KeyExpired, MissingAuthKey}`; `KeyExpired` and `MissingAuthKey` become unit variants; the build sites in `whitelist/authorization.rs`, `authentication/service.rs`, `authentication/key/mod.rs` and `http-core/src/services/announce.rs` and the tests of `http-core` and `udp-server/src/event.rs` follow. The whitelist and key tests turn green; the database and `PeerKeyError` ones stay red until T4 and T5. +- 2026-11-21 13:37 UTC - Claude Code (Claude Opus 5.5) - T4: `location` removed from `databases::error::Error::{InsertFailed, UpdateFailed, DeleteFailed}` and from the 12 driver sites (an insert and a delete in `whitelist_store.rs` and `auth_key_store.rs` of each of the three drivers). The message names the driver but not the table, so each site now emits a `tracing::warn!` with the driver, the table and, for the whitelist, the info-hash (never the key). The four `LocatedError` sources become a plain `Arc` (still `Clone`), and the two `From` conversions lose `#[track_caller]`. Decision on `UpdateFailed`: kept. No production code builds it (`grep -rn UpdateFailed packages` finds only the variant and the test double in `statistics/event/handler.rs`), but it is a public variant of a `#[non_exhaustive]` enum, removing it is not needed to remove the location, and the test double uses it as a representative persistence failure; removal can be its own change if wanted. Pinned-message unit tests added for the three variants and for a converted `sqlx` error. The driver tests are green; the `PeerKeyError` ones stay red until T5. +- 2026-11-21 13:38 UTC - Claude Code (Claude Opus 5.5) - T5: `PeerKeyError::InvalidKey` and `DatabaseError` hold the plain `ParseKeyError` and `databases::error::Error` as sources (`ParseKeyError` now derives `Clone`, `PartialEq` and `Eq`, as `PeerKeyError` is `Clone`); the six `Located(err).into()` calls in `authentication/handler.rs` pass the error itself; `authentication::key::Error::KeyVerificationError` holds a plain `Arc`, with a pinned-message test. `torrust-located-error` is removed from `packages/tracker-core/Cargo.toml`. All `torrust-tracker-core` tests pass. `grep -rn "Location::caller\|track_caller\|Located\|located_error" packages/tracker-core/src packages/http-core/src/services/announce.rs` finds only the `#[track_caller]` of the test helper `assert_names_no_source_path`. +- 2026-11-21 13:41 UTC - Claude Code (Claude Opus 5.5) - T6: the consumers needed no change beyond the T3 test updates: `cargo clippy --workspace --all-targets --all-features -- -D warnings` (stable Rust toolchain) passes, and the tests of `udp-core`, `udp-server`, `http-core`, `rest-api-runtime-adapter`, `axum-http-server` and `axum-rest-api-server` pass. The module docs of `axum-http-server/src/v1/extractors/authentication_key.rs` showed tracker-core failure reasons with old source paths; they now show the replies recorded in T7. `docs/media/packages/dependencies-workspace-packages.md` still draws `tracker-core --> located-err` (and `http-proto --> located-err` from SI-3): left for SI-6, which redraws that diagram when the crate is dropped. +- 2026-11-21 13:44 UTC - Claude Code (Claude Opus 5.5) - T7: green run at the T6 commit and the T1 requests repeated against a tracker built from the T5 commit; every reply keeps its text and loses the path, and the driver `tracing` event shows in the tracker log (`manual-verification-evidence.md`, V1 to V3; `evidence/`). M1 to M3 DONE, AC1 to AC5 DONE. Completion review: no retrospective needed. The plan held; the only additions were in scope (the `KeyVerificationError` and `databases::error::Error` `LocatedError` sources, which the spec's "Replace the `LocatedError` sources" item covers), and the one surprise is recorded in V3: duplicate whitelist writes never reach the database, so the REST database case is proven with keys. Open question to the EPIC coordinator: `UnableToReadKey` still prints the peer key ("Failed to read key: {key}"), which ADR rule 3 forbids for changed messages; kept unchanged here, outside the spec's scope. +- 2026-11-21 15:15 UTC - Claude Code (Claude Opus 5.5) - PR #2991 opened as `josecelano-bot`. Copilot's review: two documentation findings (F1, F2), both fixed; audit in `docs/pr-reviews/pr-2991-review/PR-REVIEW.md`. +- 2026-11-21 15:42 UTC - Claude Code (Claude Opus 5.5) - da2ce7 approved the round-1 head with six non-blocking findings (audit F3 to F8). Fixed: the REST delete-key doc example still showed a source path; the unregistered-key test now checks only the message prefix, so it does not pin the peer key; the evidence now records the red and green commands and a red run of the three driver steps the first red run did not reach (all three fail on a path); the request count reads twelve; the trailing blank line of `tests-green.txt` is gone. Not changed here: merging the seven copies of `assert_names_no_source_path` into `torrust-tracker-test-helpers`, suggested for SI-6. ## Acceptance Criteria -- [ ] AC1: No error type in `packages/tracker-core` has a `location` field or a `LocatedError` source. -- [ ] AC2: `packages/tracker-core/src` and `http-core/src/services/announce.rs` have no `Location::caller()`, `#[track_caller]` or `Located(..).into()` outside test code. -- [ ] AC3: A UDP reply to a non-whitelisted announce, an HTTP failure reason for whitelist and key errors, and a REST API error for a failed key or whitelist write hold no source path, each proven by a test through the protocol server. -- [ ] AC4: The `ErrorKind::Whitelist` event payload holds no source path. -- [ ] AC5: `packages/tracker-core/Cargo.toml` no longer depends on `torrust-located-error`. -- [ ] `linter all` exits with code `0` -- [ ] Relevant tests pass -- [ ] Manual verification scenarios are executed and documented in issue-local `manual-verification-evidence.md` -- [ ] Acceptance criteria are re-reviewed after implementation and reflect actual behavior -- [ ] Documentation is updated when behavior/workflow changes +- [x] AC1: No error type in `packages/tracker-core` has a `location` field or a `LocatedError` source. +- [x] AC2: `packages/tracker-core/src` and `http-core/src/services/announce.rs` have no `Location::caller()`, `#[track_caller]` or `Located(..).into()` outside test code. +- [x] AC3: A UDP reply to a non-whitelisted announce, an HTTP failure reason for whitelist and key errors, and a REST API error for a failed key or whitelist write hold no source path, each proven by a test through the protocol server. +- [x] AC4: The `ErrorKind::Whitelist` event payload holds no source path. +- [x] AC5: `packages/tracker-core/Cargo.toml` no longer depends on `torrust-located-error`. +- [x] `linter all` exits with code `0` +- [x] Relevant tests pass +- [x] Manual verification scenarios are executed and documented in issue-local `manual-verification-evidence.md` +- [x] Acceptance criteria are re-reviewed after implementation and reflect actual behavior +- [x] Documentation is updated when behavior/workflow changes ## Verification Plan @@ -240,9 +248,9 @@ Status values: `TODO`, `IN_PROGRESS`, `DONE`, `FAILED`, `BLOCKED`. | ID | Scenario | Human-oriented command/steps | Expected Result | Status | Evidence | | --- | --- | --- | --- | --- | --- | -| M1 | UDP whitelist rejection | Start a listed tracker; send a UDP announce for an info-hash that is not whitelisted (tracker client or a script) | The error message says the torrent is not whitelisted and holds no path | TODO | `manual-verification-evidence.md` section V1 | -| M2 | HTTP key and whitelist errors | Announce over HTTP for the same info-hash, and on a private tracker with an expired key | The failure reasons hold no path | TODO | `manual-verification-evidence.md` section V2 | -| M3 | REST database failure | Add the same whitelist entry or key twice through the REST API | The error text names the failed operation and holds no path, including no driver file | TODO | `manual-verification-evidence.md` section V3 | +| M1 | UDP whitelist rejection | Start a listed tracker; send a UDP announce for an info-hash that is not whitelisted (tracker client or a script) | The error message says the torrent is not whitelisted and holds no path | DONE | `manual-verification-evidence.md` section V1 | +| M2 | HTTP key and whitelist errors | Announce over HTTP for the same info-hash, and on a private tracker with an expired key | The failure reasons hold no path | DONE | `manual-verification-evidence.md` section V2 | +| M3 | REST database failure | Add the same whitelist entry or key twice through the REST API | The error text names the failed operation and holds no path, including no driver file | DONE | `manual-verification-evidence.md` section V3 | Notes: @@ -276,17 +284,24 @@ Keep the script in the issue-specification folder so later reviewers can inspect the verification performed. Promote durable product-behavior checks into Rust automatic tests when practical, then remove the disposable script. -None planned for this issue. +One disposable client was used, embedded verbatim in `manual-verification-evidence.md` (not kept as +a file): `udp_announce.py`, a 20-line BEP 15 connect-and-announce client for scenario M1, run with +`run.sh` from the agent scratchpad. Why temporary automation: the workspace ships no UDP tracker +client binary (`torrust-tracker-client` is a library), and the manual scenario needs a real client +against the release binary. Why Python rather than Rust: a one-off socket script needs no crate and +no build; the durable check is the Rust UDP contract test +`should_reject_a_torrent_that_is_not_whitelisted_with_a_message_that_holds_no_source_path`. Owner: +none; nothing is retained beyond the evidence document. ### Acceptance Verification | AC ID | Status (`TODO`/`DONE`) | Evidence | | --- | --- | --- | -| AC1 | TODO | {test/log/PR link} | -| AC2 | TODO | {test/log/PR link} | -| AC3 | TODO | {test/log/PR link} | -| AC4 | TODO | {test/log/PR link} | -| AC5 | TODO | {test/log/PR link} | +| AC1 | DONE | `grep -rn "location\|LocatedError" packages/tracker-core/src` finds only the two module docs that cite the ADR; T3 to T5 in the progress log | +| AC2 | DONE | The T5 `grep` finds only the `#[track_caller]` of the test helper `assert_names_no_source_path` | +| AC3 | DONE | UDP contract test, the three `axum-http-server` `failure_reasons_hold_no_source_path` tests, the REST `auth_key` and `whitelist` failure tests; red and green runs in `evidence/`; V1 to V3 | +| AC4 | DONE | The four `udp-server` `event::tests::it_should_classify_*whitelist_error` tests pin the full payload | +| AC5 | DONE | `grep -n located packages/tracker-core/Cargo.toml` finds nothing | ## Risks and Trade-offs @@ -303,7 +318,7 @@ After implementation, compare the result with this specification. Record invalidated assumptions, material design changes, unexpected validation findings, and reusable lessons. -- Retrospective: `Not yet assessed` +- Retrospective: not needed; see the progress-log entry of T7 - If needed, create `implementation-retrospective.md` from the repository template at `docs/templates/IMPLEMENTATION-RETROSPECTIVE.md` in this issue specification's directory. diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/evidence/responses-after.txt b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/responses-after.txt new file mode 100644 index 0000000000..ed10392444 --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/responses-after.txt @@ -0,0 +1,37 @@ +date -u: 2026-11-21 13:41:15 +U1 UDP announce, info-hash not whitelisted (listed tracker) + udp_announce.py 17069 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0 + action=3 message='tracker announce error: Tracker core whitelist error: The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted' +H1 HTTP announce, info-hash not whitelisted (listed tracker) + GET :17070/announce?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&peer_id=-qB00000000000000001&port=17548 + d14:failure reason98:Tracker whitelist error: The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelistede +W1 REST whitelist the info-hash + POST :17212/api/v1/whitelist/3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0?token= + {"status":"ok"} +W2 REST whitelist the same info-hash again + POST :17212/api/v1/whitelist/3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0?token= + {"status":"ok"} +W3 REST remove an info-hash that is not whitelisted + DELETE :17212/api/v1/whitelist/9e0217d0fa71c87332cd8bf9dbeabcb2c2cf3c4d?token= + {"status":"ok"} +H2 HTTP announce without key (private tracker) + GET :17080/announce?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&peer_id=-qB00000000000000001&port=17548 + d14:failure reason56:Tracker authentication error: Missing authentication keye +H3 HTTP announce with an unregistered key (private tracker) + GET :17080/announce/YZSl4lMZupRuOpSRC3krIKR5BPB14nrJ?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&peer_id=-qB00000000000000001&port=17548 + d14:failure reason82:Tracker authentication error: Failed to read key: YZSl4lMZupRuOpSRC3krIKR5BPB14nrJe +K1 REST add a key valid for 60 s + POST :17213/api/v1/keys?token= + {"key":"YZSl4lMZupRuOpSRC3krIKR5BPB14nrJ","valid_until":1795268536,"expiry_time":"2026-11-21 13:42:16 UTC"} +K2 REST add the same key again + POST :17213/api/v1/keys?token= + Unhandled rejection: Err { reason: "failed to add key: The Sqlite3 query was malformed: error returned from database: (code: 2067) UNIQUE constraint failed: keys.key" } +K3 REST remove a key that does not exist + DELETE :17213/api/v1/key/ZZZZ4lMZupRuOpSRC3krIKR5BPB14nrJ?token= + Unhandled rejection: Err { reason: "failed to delete key: Failed to remove record from Sqlite3 database, error-code: 0" } +K4 REST generate a key valid for 1 s + POST /api/v1/key/1?token= + {"key":"Y1eJWFGXyLqpLd0EmrnV3RQGQo9YfzI6","valid_until":1795268477,"expiry_time":"2026-11-21 13:41:17 UTC"} +H4 HTTP announce with the expired key (private tracker) + GET :17080/announce/Y1eJWFGXyLqpLd0EmrnV3RQGQo9YfzI6?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&peer_id=-qB00000000000000001&port=17548 + d14:failure reason45:Tracker authentication error: Key has expirede diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/evidence/responses-before.txt b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/responses-before.txt new file mode 100644 index 0000000000..bd889ce57c --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/responses-before.txt @@ -0,0 +1,37 @@ +date -u: 2026-11-21 13:26:47 +U1 UDP announce, info-hash not whitelisted (listed tracker) + udp_announce.py 17069 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0 + action=3 message='tracker announce error: Tracker core whitelist error: The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted, packages/tracker-core/src/whitelist/authorization.rs:61:23' +H1 HTTP announce, info-hash not whitelisted (listed tracker) + GET :17070/announce?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&peer_id=-qB00000000000000001&port=17548 + d14:failure reason158:Tracker whitelist error: The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted, packages/tracker-core/src/whitelist/authorization.rs:61:23e +W1 REST whitelist the info-hash + POST :17212/api/v1/whitelist/3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0?token= + {"status":"ok"} +W2 REST whitelist the same info-hash again + POST :17212/api/v1/whitelist/3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0?token= + {"status":"ok"} +W3 REST remove an info-hash that is not whitelisted + DELETE :17212/api/v1/whitelist/9e0217d0fa71c87332cd8bf9dbeabcb2c2cf3c4d?token= + {"status":"ok"} +H2 HTTP announce without key (private tracker) + GET :17080/announce?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&peer_id=-qB00000000000000001&port=17548 + d14:failure reason108:Tracker authentication error: Missing authentication key, packages/http-core/src/services/announce.rs:308:27e +H3 HTTP announce with an unregistered key (private tracker) + GET :17080/announce/YZSl4lMZupRuOpSRC3krIKR5BPB14nrJ?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&peer_id=-qB00000000000000001&port=17548 + d14:failure reason141:Tracker authentication error: Failed to read key: YZSl4lMZupRuOpSRC3krIKR5BPB14nrJ, packages/tracker-core/src/authentication/service.rs:98:27e +K1 REST add a key valid for 60 s + POST :17213/api/v1/keys?token= + {"key":"YZSl4lMZupRuOpSRC3krIKR5BPB14nrJ","valid_until":1795267667,"expiry_time":"2026-11-21 13:27:47 UTC"} +K2 REST add the same key again + POST :17213/api/v1/keys?token= + Unhandled rejection: Err { reason: "failed to add key: The Sqlite3 query was malformed: error returned from database: (code: 2067) UNIQUE constraint failed: keys.key, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:74:22, packages/tracker-core/src/authentication/handler.rs:103:50" } +K3 REST remove a key that does not exist + DELETE :17213/api/v1/key/ZZZZ4lMZupRuOpSRC3krIKR5BPB14nrJ?token= + Unhandled rejection: Err { reason: "failed to delete key: Failed to remove record from Sqlite3 database, error-code: 0, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:108:27" } +K4 REST generate a key valid for 1 s + POST /api/v1/key/1?token= + {"key":"m7FAV1hgRWlU0iLnmOku4ryjW6pg1vtk","valid_until":1795267608,"expiry_time":"2026-11-21 13:26:48 UTC"} +H4 HTTP announce with the expired key (private tracker) + GET :17080/announce/m7FAV1hgRWlU0iLnmOku4ryjW6pg1vtk?info_hash=%3B%24U%04%CF%5F%11%BB%DB%E1%20%1C%EAjk%F4Z%EE%1B%C0&peer_id=-qB00000000000000001&port=17548 + d14:failure reason105:Tracker authentication error: Key has expired, packages/tracker-core/src/authentication/key/mod.rs:158:31e diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-green.txt b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-green.txt new file mode 100644 index 0000000000..9dbbe886bc --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-green.txt @@ -0,0 +1,427 @@ + Finished `test` profile [optimized + debuginfo] target(s) in 0.13s + Running unittests src/lib.rs (target/debug/build/torrust-tracker-core/0b706dc5248b0fe7/out/torrust_tracker_core-0b706dc5248b0fe7) + +running 165 tests +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_client_ip_is_a_ipv6_loopback_ip::it_should_use_the_external_ip_in_the_tracker_configuration_if_it_is_defined_even_if_the_external_ip_is_an_ipv4_ip ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_client_ip_is_a_ipv6_loopback_ip::it_should_use_the_external_ip_in_tracker_configuration_if_it_is_defined ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_client_ip_is_a_ipv4_loopback_ip::it_should_use_the_loopback_ip_if_the_tracker_does_not_have_the_external_ip_configuration ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_client_ip_is_a_ipv6_loopback_ip::it_should_use_the_loopback_ip_if_the_tracker_does_not_have_the_external_ip_configuration ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_client_ip_is_a_ipv4_loopback_ip::it_should_use_the_external_ip_in_the_tracker_configuration_if_it_is_defined_even_if_the_external_ip_is_an_ipv6_ip ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_ipv6_loopback_ip_when_the_external_ip_is_the_unspecified_ipv4_address ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_ipv6_loopback_ip_when_the_external_ip_is_the_unspecified_ipv6_address ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_ipv4_loopback_ip_when_the_external_ip_is_the_unspecified_ipv6_address ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_non_loopback_ip_when_the_external_ip_is_unspecified_ipv6 ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_client_ip_is_a_ipv4_loopback_ip::it_should_use_the_external_tracker_ip_in_tracker_configuration_if_it_is_defined ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::using_the_source_ip_instead_of_the_ip_in_the_announce_request ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_ipv4_loopback_ip_when_the_external_ip_is_the_unspecified_ipv4_address ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_allow_limiting_the_peer_list ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_cap_only_peers_wanted_at_limit_time ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_non_loopback_ip_when_the_external_ip_is_unspecified_ipv4 ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_convert_the_peers_wanted_number_from_i32_via_from_client_request ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_return_74_at_the_most_if_the_client_wants_them_all ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_return_the_maximin_number_of_peers_by_default ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_return_the_maximum_when_wanting_more_than_the_maximum ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_return_zero_when_wanting_only_zero ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::pre_generated::it_should_fail_adding_a_pre_generated_key_when_there_is_a_database_error ... ok +test authentication::key::peer_key::tests::key::should_be_generated_randomly ... ok +test authentication::key::peer_key::tests::key::should_be_parsed_from_an_string ... ok +test authentication::key::peer_key::tests::key::should_only_include_alphanumeric_chars ... ok +test authentication::key::peer_key::tests::peer_key::could_be_permanent ... ok +test authentication::key::peer_key::tests::key::length_should_be_32 ... ok +test authentication::key::peer_key::tests::key::should_return_a_reference_to_the_inner_string ... ok +test authentication::key::peer_key::tests::peer_key::could_have_an_expiration_time ... ok +test authentication::key::tests::the_expiring_peer_key::should_be_displayed ... ok +test authentication::key::peer_key::tests::peer_key::expiring::should_be_displayed_when_it_is_expiring ... ok +test authentication::key::peer_key::tests::peer_key::permanent::should_be_displayed_when_it_is_permanent ... ok +test authentication::key::tests::the_expiring_peer_key::should_be_generated_with_a_expiration_time ... ok +test authentication::key::tests::the_expiring_peer_key::expiration_verification_should_fail_when_the_key_has_expired ... ok +test authentication::key::tests::the_key_verification_error::could_be_a_database_error ... ok +test authentication::key::tests::the_key_verification_error::should_render_the_database_error_text_and_no_source_path ... ok +test authentication::key::tests::the_permanent_peer_key::expiration_verification_should_always_succeed ... ok +test authentication::key::tests::the_permanent_peer_key::should_be_displayed ... ok +test authentication::key::tests::the_permanent_peer_key::should_be_generated_without_expiration_time ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::reset_the_peer_keys_with_a_new_list_of_keys ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::insert_a_new_peer_key ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_not_authenticate_an_unregistered_key ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_expired_key_with_a_message_that_holds_no_source_path ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_unregistered_key_with_a_message_that_holds_no_source_path ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_public::it_should_always_authenticate_when_the_tracker_is_public ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::remove_a_new_peer_key ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::clear_all_peer_keys ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::but_the_key_expiration_check_is_disabled_by_configuration::it_should_authenticate_an_expired_registered_key ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_not_authenticate_a_registered_but_expired_key_by_default ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_authenticate_a_registered_key ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_not_authenticate_a_registered_but_expired_key_when_the_tracker_is_explicitly_configured_to_check_keys_expiration ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::pre_generated_keys::it_should_fail_adding_a_pre_generated_key_when_there_is_a_database_error ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::get_a_new_peer_key_by_its_internal_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::randomly_generated::it_should_fail_adding_a_randomly_generated_key_when_there_is_a_database_error ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::randomly_generated::it_should_fail_adding_a_randomly_generated_key_when_there_is_a_database_error ... ok +test container::tests::it_should_return_a_typed_error_when_persistent_statistics_lack_persistence ... ok +test container::tests::it_should_construct_a_tracker_core_container_without_persistence ... ok +test databases::driver::sqlite::schema_migrator::tests::bootstrap_legacy_schema_should_be_a_noop_on_a_fresh_database ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_update_the_swarm_stats_for_the_torrent::when_the_peer_is_a_leecher ... ok +test databases::driver::sqlite::schema_migrator::tests::bootstrap_legacy_schema_should_reject_partial_legacy_state ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_return_the_announce_data_with_an_empty_peer_list_when_it_is_the_first_announced_peer ... ok +test databases::error::tests::it_should_build_a_database_error_from_a_sqlx_io_error ... ok +test databases::error::tests::it_should_build_a_database_error_from_a_sqlx_row_not_found_error ... ok +test databases::error::tests::it_should_render_a_failed_delete_naming_the_driver_and_the_rows_removed ... ok +test databases::error::tests::it_should_render_a_failed_insert_naming_the_driver ... ok +test databases::error::tests::it_should_render_a_failed_update_naming_the_driver ... ok +test databases::error::tests::it_should_render_a_sqlx_error_with_its_own_text_and_no_source_path ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_return_the_announce_data_with_the_previously_announced_peers ... ok +test error::tests::peer_key_error::duration_overflow ... ok +test error::tests::peer_key_error::parsing_from_string ... ok +test error::tests::peer_key_error::persisting_into_database ... ok +test error::tests::whitelist_error::torrent_not_whitelisted ... ok +test peer_tests::it_should_be_serializable ... ok +test scrape_handler::tests::it_should_allow_scraping_for_multiple_torrents ... ok +test scrape_handler::tests::it_should_fail_when_loading_the_persisted_downloads_fails ... ok +test scrape_handler::tests::it_should_load_the_persisted_downloads_of_all_torrents_absent_from_memory_in_one_query ... ok +test scrape_handler::tests::it_should_look_up_a_repeated_info_hash_absent_from_memory_only_once ... ok +test scrape_handler::tests::it_should_report_an_in_memory_swarm_without_reading_the_persisted_downloads ... ok +test scrape_handler::tests::it_should_report_every_requested_torrent_without_a_limit_on_the_number_of_info_hashes ... ok +test scrape_handler::tests::it_should_return_a_zeroed_swarm_metadata_for_the_requested_file_if_the_tracker_does_not_have_that_torrent ... ok +test statistics::event::handler::tests::it_should_increment_in_memory_completion_metrics_when_a_peer_download_is_completed ... ok +test statistics::event::handler::tests::it_should_not_increment_in_memory_completion_metrics_when_an_event_is_not_a_completion ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_allow_peers_to_get_only_a_subset_of_the_peers_in_the_swarm ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_update_the_swarm_stats_for_the_torrent::when_the_peer_is_a_seeder ... ok +test statistics::event::handler::tests::it_should_persist_global_completion_statistics_when_torrent_persistence_fails ... ok +test statistics::event::listener::tests::it_should_continue_after_lag_then_handle_an_event_then_stop_when_the_in_memory_receiver_is_closed ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::pre_generated::it_should_fail_adding_a_pre_generated_key_when_the_key_duration_exceeds_the_maximum_duration ... ok +test statistics::event::listener::tests::it_should_handle_a_queued_event_then_return_cancelled_when_cancellation_is_already_pending ... ok +test statistics::event::listener::tests::it_should_handle_an_event_then_stop_when_the_in_memory_receiver_is_closed ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::it_should_generate_the_key ... ok +test statistics::event::listener::tests::it_should_leave_the_queued_event_unprocessed_and_return_cancelled_when_the_drain_timeout_has_expired ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_update_the_swarm_stats_for_the_torrent::when_a_previously_announced_started_peer_has_completed_downloading ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::pre_generated::it_should_fail_adding_a_pre_generated_key_when_the_key_is_invalid ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::pre_generated_keys::it_should_fail_adding_a_pre_generated_key_when_the_key_is_invalid ... ok +test statistics::event::listener::tests::it_should_stop_when_the_in_memory_receiver_is_closed ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::pre_generated::it_should_add_a_pre_generated_key ... ok +test authentication::tests::the_tracker_configured_as_private::it_should_load_authentication_keys_from_the_database ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_key_is_invalid ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::randomly_generated::it_should_add_a_randomly_generated_key ... ok +test statistics::repository::tests::it_should_export_persisted_metric_with_zero_value_when_persisted_completed_statistics_are_enabled ... ok +test statistics::repository::tests::it_should_omit_persisted_metric_when_persisted_completed_statistics_are_disabled ... ok +test authentication::key::repository::persisted::tests::the_persisted_key_repository_should::persist_a_new_peer_key ... ok +test authentication::tests::the_tracker_configured_as_private::it_should_remove_an_authentication_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::randomly_generated::it_should_generate_the_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::pre_generated_keys::it_should_add_a_pre_generated_key ... ok +test authentication::tests::the_tracker_configured_as_private::with_expiring_and::pre_generated_keys::it_should_authenticate_a_peer_with_the_key ... ok +test authentication::tests::the_tracker_configured_as_private::with_expiring_and::randomly_generated_keys::it_should_authenticate_a_peer_with_the_key ... ok +test authentication::tests::the_tracker_configured_as_private::with_permanent_and::randomly_generated_keys::it_should_authenticate_a_peer_with_the_key ... ok +test authentication::tests::the_tracker_configured_as_private::with_expiring_and::randomly_generated_keys::it_should_accept_an_expired_key_when_checking_expiration_is_disabled_in_configuration ... ok +test authentication::tests::the_tracker_configured_as_private::with_permanent_and::pre_generated_keys::it_should_authenticate_a_peer_with_the_key ... ok +test torrent::services::tests::getting_a_torrent_info::it_should_return_none_if_the_tracker_does_not_have_the_torrent ... ok +test torrent::services::tests::getting_a_torrent_info::it_should_return_the_torrent_info_if_the_tracker_has_the_torrent ... ok +test torrent::services::tests::getting_basic_torrent_info_for_multiple_torrents_at_once::it_should_return_an_empty_list_if_none_of_the_requested_torrents_is_found ... ok +test torrent::services::tests::getting_basic_torrent_info_for_multiple_torrents_at_once::it_should_return_a_list_with_basic_info_about_the_requested_torrents ... ok +test torrent::services::tests::searching_for_torrents::it_should_allow_limiting_the_number_of_torrents_in_the_result ... ok +test torrent::services::tests::searching_for_torrents::it_should_allow_using_pagination_in_the_result ... ok +test torrent::services::tests::searching_for_torrents::it_should_return_a_summarized_info_for_all_torrents ... ok +test torrent::services::tests::searching_for_torrents::it_should_return_an_empty_result_if_the_tracker_does_not_have_any_torrent ... ok +test torrent::services::tests::searching_for_torrents::it_should_return_torrents_ordered_by_info_hash ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_configured_as_listed::should_not_authorize_a_non_whitelisted_infohash ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_configured_as_listed::should_authorize_a_whitelisted_infohash ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_configured_as_listed::should_reject_a_non_whitelisted_infohash_with_a_message_that_names_it_and_holds_no_source_path ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_not_configured_as_listed::should_also_authorize_a_non_whitelisted_infohash ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_not_configured_as_listed::should_authorize_a_whitelisted_infohash ... ok +test whitelist::repository::in_memory::tests::should_allow_adding_a_new_torrent_to_the_whitelist ... ok +test whitelist::repository::in_memory::tests::should_allow_checking_if_an_infohash_is_whitelisted ... ok +test whitelist::repository::in_memory::tests::should_allow_clearing_the_whitelist ... ok +test whitelist::repository::in_memory::tests::should_allow_removing_a_new_torrent_to_the_whitelist ... ok +test authentication::tests::the_tracker_configured_as_private::with_expiring_and::pre_generated_keys::it_should_accept_an_expired_key_when_checking_expiration_is_disabled_in_configuration ... ok +test authentication::key::repository::persisted::tests::the_persisted_key_repository_should::remove_a_persisted_peer_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::randomly_generated::it_should_add_a_randomly_generated_key ... ok +test authentication::key::repository::persisted::tests::the_persisted_key_repository_should::load_all_persisted_peer_keys ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_database_rejects_a_duplicate_key ... ok +test container::tests::it_should_construct_a_tracker_core_container_with_supplied_persistence ... ok +test container::tests::it_should_load_persistent_completed_statistics_when_a_torrent_is_first_announced ... ok +test databases::setup::tests::it_should_initialize_the_sqlite_database ... ok +test statistics::event::handler::tests::it_should_not_persist_completion_statistics_when_an_event_is_not_a_completion ... ok +test statistics::event::listener::tests::it_should_continue_after_lag_then_handle_an_event_then_stop_when_the_persistent_receiver_is_closed ... ok +test databases::driver::sqlite::schema_migrator::tests::bootstrap_legacy_schema_should_seed_history_when_all_legacy_tables_exist ... ok +test statistics::event::handler::tests::it_should_persist_completion_statistics_when_a_peer_download_is_completed ... ok +test databases::driver::sqlite::tests::create_database_tables_should_be_idempotent_on_a_fresh_database ... ok +test torrent::manager::tests::cleaning_torrents::it_should_retain_peerless_torrents_when_it_is_configured_to_do_so ... ok +test statistics::event::listener::tests::it_should_leave_the_queued_events_unprocessed_and_return_cancelled_when_the_drain_timeout_has_expired ... ok +test statistics::event::listener::tests::it_should_stop_when_the_persistent_receiver_is_closed ... ok +test torrent::manager::tests::cleaning_torrents::it_should_remove_torrents_that_have_no_peers_when_it_is_configured_to_do_so ... ok +test torrent::manager::tests::cleaning_torrents::it_should_remove_peers_that_have_not_been_updated_after_a_cutoff_time ... ok +test tests::the_tracker::for_all_config_modes::handling_a_scrape_request::it_should_return_the_swarm_metadata_for_the_requested_file_if_the_tracker_has_that_torrent ... ok +test statistics::event::listener::tests::it_should_persist_every_queued_event_then_return_cancelled_when_cancellation_is_already_pending ... ok +test statistics::event::listener::tests::it_should_handle_an_event_then_stop_when_the_persistent_receiver_is_closed ... ok +test tests::the_tracker::configured_as_whitelisted::handling_a_scrape_request::it_should_return_the_zeroed_swarm_metadata_for_the_requested_file_if_it_is_not_whitelisted ... ok +test statistics::persisted::downloads::tests::it_loads_the_numbers_of_downloads_for_all_torrents_from_the_database ... ok +test statistics::event::listener::tests::it_should_persist_a_queued_completed_download_when_cancellation_is_already_pending ... ok +test statistics::persisted::downloads::tests::it_saves_the_numbers_of_downloads_for_a_torrent_into_the_database ... ok +test statistics::persisted::downloads::tests::it_increases_the_numbers_of_downloads_for_a_torrent_into_the_database ... ok +test whitelist::tests::configured_as_whitelisted::handling_authorization::it_should_not_authorize_the_announce_and_scrape_actions_on_not_whitelisted_torrents ... ok +test whitelist::manager::tests::configured_as_whitelisted::handling_the_torrent_whitelist::it_should_remove_a_torrent_from_the_whitelist ... ok +test whitelist::manager::tests::configured_as_whitelisted::handling_the_torrent_whitelist::it_should_add_a_torrent_to_the_whitelist ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_add_a_new_infohash_to_the_list ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_load_all_infohashes_from_the_database ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_remove_a_infohash_from_the_list ... ok +test whitelist::manager::tests::configured_as_whitelisted::handling_the_torrent_whitelist::persistence::it_should_load_the_whitelist_from_the_database ... ok +test torrent::manager::tests::it_should_load_the_numbers_of_downloads_for_all_torrents_from_the_database ... ok +test whitelist::tests::configured_as_whitelisted::handling_authorization::it_should_authorize_the_announce_and_scrape_actions_on_whitelisted_torrents ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_not_fail_removing_an_infohash_that_is_not_in_the_list ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_not_add_the_same_infohash_to_the_list_twice ... ok +test databases::driver::sqlite::tests::run_sqlite_driver_tests ... ok + +test result: ok. 165 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s + + Finished `test` profile [optimized + debuginfo] target(s) in 0.14s + Running unittests src/lib.rs (target/debug/build/torrust-tracker-udp-server/5b1150e2043e54ce/out/torrust_tracker_udp_server-5b1150e2043e54ce) + +running 45 tests +test banning::event::listener::tests::it_should_ignore_non_connection_cookie_errors ... ok +test banning::event::listener::tests::it_should_process_connection_cookie_errors_after_lagging ... ok +test banning::event::handler::tests::it_should_hold_the_publication_order_until_it_has_published_the_banned_ip_total ... ok +test banning::event::handler::tests::it_should_record_the_connection_cookie_error_for_its_client_ip ... ok +test banning::event::handler::tests::it_should_not_hold_the_ban_service_lock_while_waiting_to_publish_the_banned_ip_total ... ok +test banning::event::handler::tests::it_should_publish_the_banned_ip_total_after_a_connection_cookie_error ... ok +test banning::event::listener::tests::it_should_handle_a_queued_event_then_return_cancelled_when_cancellation_is_already_pending ... ok +test banning::event::listener::tests::it_should_leave_the_queued_event_unprocessed_and_return_cancelled_when_the_drain_timeout_has_expired ... ok +test event::tests::it_should_classify_a_negative_number_of_bytes_in_an_announce_as_a_bad_request ... ok +test banning::event::listener::tests::it_should_stop_when_the_receiver_is_closed ... ok +test event::tests::it_should_classify_a_nested_announce_whitelist_error ... ok +test event::tests::it_should_classify_a_direct_scrape_whitelist_error ... ok +test event::tests::it_should_classify_a_database_error ... ok +test event::tests::it_should_classify_a_scrape_connection_cookie_error ... ok +test event::tests::it_should_classify_a_connection_cookie_error ... ok +test event::tests::it_should_classify_a_nested_scrape_whitelist_error ... ok +test event::tests::it_should_classify_a_whitelist_error ... ok +test event::tests::it_should_classify_a_scrape_database_error ... ok +test event::tests::it_should_classify_an_authentication_error ... ok +test event::tests::it_should_classify_an_internal_error ... ok +test event::tests::it_should_classify_an_invalid_request_as_a_request_parse_error ... ok +test event::tests::it_should_convert_request_kinds_to_metric_labels ... ok +test event::tests::it_should_render_request_kinds ... ok +test statistics::event::handler::error::tests::it_should_increase_the_udp4_errors_counter_when_it_receives_a_udp4_error_event ... ok +test statistics::event::handler::error::tests::it_should_label_a_general_error_metric_with_connect_request_kind ... ok +test statistics::event::handler::request_aborted::tests::it_should_increase_the_number_of_aborted_requests_when_it_receives_a_udp_request_aborted_event ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp4_connect_requests_counter_when_it_receives_a_udp4_request_event_of_connect_kind ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp4_scrape_requests_counter_when_it_receives_a_udp4_request_event_of_scrape_kind ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp6_connect_requests_counter_when_it_receives_a_udp6_request_event_of_connect_kind ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp6_announce_requests_counter_when_it_receives_a_udp6_request_event_of_announce_kind ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp6_scrape_requests_counter_when_it_receives_a_udp6_request_event_of_scrape_kind ... ok +test statistics::event::handler::request_banned::tests::it_should_increase_the_number_of_banned_requests_when_it_receives_a_udp_request_banned_event ... ok +test statistics::event::handler::request_discarded::tests::it_should_increase_the_number_of_discarded_requests_when_it_receives_a_udp_request_discarded_event ... ok +test statistics::event::handler::request_received::tests::it_should_increase_the_number_of_incoming_requests_when_it_receives_a_udp4_incoming_request_event ... ok +test statistics::event::handler::response_sent::tests::it_should_increase_the_udp4_responses_counter_when_it_receives_a_udp4_response_event ... ok +test statistics::event::handler::response_sent::tests::it_should_increase_the_udp6_response_counter_when_it_receives_a_udp6_response_event ... ok +test statistics::event::handler::error::tests::it_should_label_a_connection_id_error_metric_with_qbittorrent_client_software ... ok +test statistics::event::handler::response_sent::tests::it_should_update_the_connect_processing_time_average_for_a_successful_connect_response ... ok +test statistics::event::listener::tests::it_should_apply_the_metrics_policy_to_a_drained_event ... ok +test statistics::event::listener::tests::it_should_leave_the_queued_event_unprocessed_and_return_cancelled_when_the_drain_timeout_has_expired ... ok +test statistics::event::listener::tests::it_should_handle_a_queued_event_then_return_cancelled_when_cancellation_is_already_pending ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp4_announce_requests_counter_when_it_receives_a_udp4_request_event_of_announce_kind ... ok +test statistics::event::listener::tests::it_should_process_enabled_events_after_lagging ... ok +test statistics::event::listener::tests::it_should_stop_when_the_receiver_is_closed ... ok +test statistics::event::listener::tests::it_should_update_metrics_only_for_an_enabled_configuration_instance ... ok + +test result: ok. 45 passed; 0 failed; 0 ignored; 0 measured; 179 filtered out; finished in 0.00s + + Finished `test` profile [optimized + debuginfo] target(s) in 0.14s + Running tests/integration.rs (target/debug/build/torrust-tracker-udp-server/bd8a94e9b983c121/out/integration-bd8a94e9b983c121) + +running 17 tests +2026-11-21T13:42:28.229079Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:53434 +2026-11-21T13:42:28.233043Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:53521 +2026-11-21T13:42:28.234281Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:44597 +2026-11-21T13:42:28.234426Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:45113 +2026-11-21T13:42:28.234955Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:47840 +2026-11-21T13:42:28.235998Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -3884683641874992000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795268427.2359886 client_socket_addr=127.0.0.1:40306 server_socket_addr=127.0.0.1:46147 service_binding=udp://127.0.0.1:46147 request_id=28837d98-fede-47c6-8412-c00accb74940 transaction_id=0 +2026-11-21T13:42:28.236016Z ERROR UDP TRACKER: response error error=error parsing request: SendableRequestParseError { message: "Protocol identifier missing", opt_connection_id: None, opt_transaction_id: None } client_socket_addr=127.0.0.1:51528 server_socket_addr=127.0.0.1:38342 service_binding=udp://127.0.0.1:38342 request_id=cbada432-e788-4520-9e47-bdb43358b5e5 +2026-11-21T13:42:28.237138Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -2715048903937551000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795268427.2371294 client_socket_addr=127.0.0.1:35172 server_socket_addr=127.0.0.1:38822 service_binding=udp://127.0.0.1:38822 request_id=1e14acef-c362-449f-a4f4-db5145f698fe transaction_id=0 +test server::contract::receiving_an_scrape_request::should_return_a_scrape_response ... ok +test server::contract::receiving_a_connection_request::should_return_a_connect_response ... ok +2026-11-21T13:42:28.245509Z ERROR torrust_tracker_core::whitelist::authorization: error=The torrent: a5164e55859ef48a4ccd5ac92352402f78c081ed, is not whitelisted +2026-11-21T13:42:28.245515Z ERROR UDP TRACKER: response error error=tracker announce error: Tracker core whitelist error: The torrent: a5164e55859ef48a4ccd5ac92352402f78c081ed, is not whitelisted client_socket_addr=127.0.0.1:46352 server_socket_addr=127.0.0.1:41099 service_binding=udp://127.0.0.1:41099 request_id=636dea15-51f3-42b3-81b5-acd946da243f transaction_id=123 +test server::contract::publishing_the_banned_ips_total::with_disabled_connection_id_validation::should_not_publish_a_client_as_banned_before_it_exceeds_the_connection_id_error_limit ... ok +2026-11-21T13:42:28.247921Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:37144 +2026-11-21T13:42:28.248657Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -3884683641874992000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795268427.2486534 client_socket_addr=127.0.0.1:40306 server_socket_addr=127.0.0.1:46147 service_binding=udp://127.0.0.1:46147 request_id=13288e17-008e-45ef-8362-463f1e7f2f22 transaction_id=1 +2026-11-21T13:42:28.248672Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -2715048903937551000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795268427.248666 client_socket_addr=127.0.0.1:35172 server_socket_addr=127.0.0.1:38822 service_binding=udp://127.0.0.1:38822 request_id=d6db1760-539c-4fd3-96a5-e99e0bf6d8cb transaction_id=1 +2026-11-21T13:42:28.248737Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -3884683641874992000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795268427.2487354 client_socket_addr=127.0.0.1:40306 server_socket_addr=127.0.0.1:46147 service_binding=udp://127.0.0.1:46147 request_id=671ba0f2-aace-4ac1-94e0-53a24bc16877 transaction_id=2 +2026-11-21T13:42:28.263355Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.263348 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=50c1d213-ea6b-4c87-b8ee-ce50a4ac34bc transaction_id=-1072220902 +test server::contract::using_ipv6_v6only::should_accept_ipv6_connections_with_ipv6_v6only_enabled ... ok +test server::contract::should_return_a_bad_request_response_when_the_client_sends_an_empty_request ... ok +test server::contract::using_disabled_connection_id_validation::connect_still_issues_a_valid_connection_id ... ok +test server::contract::using_disabled_connection_id_validation::scrape_succeeds_with_an_arbitrary_connection_id ... ok +2026-11-21T13:42:28.280019Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.280014 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=a4236dca-1104-44cf-b85f-01d4bece9354 transaction_id=714273134 +2026-11-21T13:42:28.280100Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.2800977 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=1f632dfd-9fa6-4b95-909c-7ffd18a5ddd7 transaction_id=-304773688 +2026-11-21T13:42:28.280148Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.2801473 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=e5a80418-a1ca-4826-b8b5-54005677dbb0 transaction_id=-1328187140 +2026-11-21T13:42:28.280198Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.280197 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=72e3168d-080f-47ae-897d-3e217fbef424 transaction_id=-768014602 +2026-11-21T13:42:28.280239Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.2802384 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=92526fa4-a3c2-4603-8a29-a361b9f16910 transaction_id=357071643 +2026-11-21T13:42:28.280280Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.2802792 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=6cd12b75-5835-43b8-b452-97fb086449a4 transaction_id=683899386 +2026-11-21T13:42:28.280321Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.28032 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=0b14a8e2-7e2f-4269-a8ee-730e08a50968 transaction_id=1185375477 +2026-11-21T13:42:28.280362Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.2803614 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=8a4acf43-7487-492d-b071-ecd083dd6bb5 transaction_id=699017026 +2026-11-21T13:42:28.280407Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.2804065 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=d957579e-7f14-4883-bd52-8311920d072c transaction_id=1203721691 +2026-11-21T13:42:28.280452Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007370314121822049, expected > 1795268427.280451 client_socket_addr=127.0.0.1:59261 server_socket_addr=127.0.0.1:34871 service_binding=udp://127.0.0.1:34871 request_id=559251ad-30af-4052-bc79-3e8a58910f05 transaction_id=-1922578197 +test server::contract::receiving_an_announce_request::should_return_an_announce_response ... ok +test server::contract::receiving_an_scrape_request::should_return_only_the_first_74_torrent_stats_when_the_request_has_75_info_hashes ... ok +test server::contract::receiving_an_announce_request::should_reject_a_torrent_that_is_not_whitelisted_with_a_message_that_holds_no_source_path ... ok +test server::contract::publishing_the_banned_ips_total::with_strict_connection_id_validation::should_not_publish_a_client_as_banned_before_it_exceeds_the_connection_id_error_limit ... ok +test server::contract::publishing_the_banned_ips_total::with_strict_connection_id_validation::should_publish_a_client_as_banned_once_it_exceeds_the_connection_id_error_limit ... ok +test server::contract::publishing_the_banned_ips_total::with_disabled_connection_id_validation::should_publish_a_client_that_exceeds_the_connection_id_error_limit_as_would_be_banned ... ok +test server::contract::using_disabled_connection_id_validation::many_invalid_connection_ids_do_not_cause_ban_in_disabled_mode ... ok +test server::contract::using_disabled_connection_id_validation::announce_succeeds_with_an_arbitrary_connection_id ... ok +test server::contract::receiving_an_announce_request::should_return_many_announce_response ... ok +test server::contract::receiving_an_announce_request::should_ban_the_client_ip_if_it_sends_more_than_10_requests_with_a_cookie_value_not_normal ... ok + +test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.11s + + Compiling torrust-tracker-axum-http-server v0.1.0 (/packages/axum-http-server) + Finished `test` profile [optimized + debuginfo] target(s) in 0.81s + Running tests/integration.rs (target/debug/build/torrust-tracker-axum-http-server/8be83a73e2eb672f/out/integration-8be83a73e2eb672f) + +running 14 tests +2026-11-21T13:42:34.190901Z ERROR torrust_tracker_core::whitelist::authorization: error=The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_without_a_key ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_with_a_short_peer_id ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_with_a_malformed_key ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_without_the_info_hash_param ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_listed_tracker_for_a_torrent_that_is_not_whitelisted ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_with_a_short_info_hash ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_tracker_behind_a_reverse_proxy_without_the_x_forwarded_for_header ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::a_scrape_with_a_short_info_hash ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_with_an_unregistered_key ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::a_scrape_without_query_params ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::a_scrape_without_the_info_hash_param ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_without_query_params ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_with_an_invalid_numwant_param ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_with_an_unparsable_query ... ok + +test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 63 filtered out; finished in 1.09s + + Finished `test` profile [optimized + debuginfo] target(s) in 0.14s + Running tests/integration.rs (target/debug/build/torrust-tracker-axum-rest-api-server/19e3c26806ff5d31/out/integration-19e3c26806ff5d31) + +running 60 tests +2026-11-21T13:42:35.592276Z WARN torrust_tracker_core::databases::driver::sqlite::auth_key_store: the delete did not remove exactly one row driver=Sqlite3 table="keys" rows_deleted=0 +2026-11-21T13:42:35.592298Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39415 service_binding=http://127.0.0.1:39415/ request_id=fb3861e3-b1d4-4303-8dbc-57f22beef0a0 +2026-11-21T13:42:35.592306Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39415 service_binding=http://127.0.0.1:39415/ +2026-11-21T13:42:35.598414Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:41127 service_binding=http://127.0.0.1:41127/ request_id=a18f9287-d216-4dee-88c9-801a6d8cc0d2 +2026-11-21T13:42:35.598425Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:41127 service_binding=http://127.0.0.1:41127/ +2026-11-21T13:42:35.600986Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:41127 service_binding=http://127.0.0.1:41127/ request_id=2f880168-de2b-4190-acd9-ed9d271cf753 +2026-11-21T13:42:35.600996Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:41127 service_binding=http://127.0.0.1:41127/ +2026-11-21T13:42:35.611568Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:43599 service_binding=http://127.0.0.1:43599/ request_id=8add51b1-a10b-4d90-9f59-71ea3da7be63 +2026-11-21T13:42:35.611579Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:43599 service_binding=http://127.0.0.1:43599/ +2026-11-21T13:42:35.619227Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:34285 service_binding=http://127.0.0.1:34285/ request_id=546548ff-26b4-49dc-a1a5-a14203d06885 +2026-11-21T13:42:35.619238Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:34285 service_binding=http://127.0.0.1:34285/ +2026-11-21T13:42:35.621858Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:34285 service_binding=http://127.0.0.1:34285/ request_id=334924b1-c755-4523-ab59-442c2ca2d9d7 +2026-11-21T13:42:35.621867Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:34285 service_binding=http://127.0.0.1:34285/ +2026-11-21T13:42:35.622036Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:41987 service_binding=http://127.0.0.1:41987/ request_id=75cdbb87-ce51-4b6d-b89e-02e11753cdf7 +2026-11-21T13:42:35.622046Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:41987 service_binding=http://127.0.0.1:41987/ +2026-11-21T13:42:35.623752Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:35671 service_binding=http://127.0.0.1:35671/ request_id=78df89d3-050e-47d8-aa3e-229b0e640ad9 +2026-11-21T13:42:35.623761Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:35671 service_binding=http://127.0.0.1:35671/ +2026-11-21T13:42:35.624017Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:35621 service_binding=http://127.0.0.1:35621/ request_id=bd87849d-602b-4de1-98eb-06100fb284ec +2026-11-21T13:42:35.624027Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:45617 service_binding=http://127.0.0.1:45617/ request_id=60f52f24-8b6a-4ab8-9926-b8f3eeb813aa +2026-11-21T13:42:35.624031Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:35621 service_binding=http://127.0.0.1:35621/ +2026-11-21T13:42:35.624038Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:45617 service_binding=http://127.0.0.1:45617/ +2026-11-21T13:42:35.625100Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:41987 service_binding=http://127.0.0.1:41987/ request_id=40ee1040-99f7-49ba-829a-3980ee2ec7ee +2026-11-21T13:42:35.625109Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:41987 service_binding=http://127.0.0.1:41987/ +2026-11-21T13:42:35.625325Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:42119 service_binding=http://127.0.0.1:42119/ request_id=753db5ea-5486-4963-a8c9-4ff02be6fe6a +2026-11-21T13:42:35.625338Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:42119 service_binding=http://127.0.0.1:42119/ +2026-11-21T13:42:35.625356Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:42541 service_binding=http://127.0.0.1:42541/ request_id=69d953be-243b-4b4d-983d-ea440b0d6422 +2026-11-21T13:42:35.625369Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:42541 service_binding=http://127.0.0.1:42541/ +2026-11-21T13:42:35.626543Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39017 service_binding=http://127.0.0.1:39017/ request_id=eec179c8-098d-4cc9-a6a5-f63516866847 +2026-11-21T13:42:35.626554Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39017 service_binding=http://127.0.0.1:39017/ +2026-11-21T13:42:35.643746Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:40271 service_binding=http://127.0.0.1:40271/ request_id=6903df7f-77a0-4e50-90d4-c931050974a0 +2026-11-21T13:42:35.643756Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:40271 service_binding=http://127.0.0.1:40271/ +2026-11-21T13:42:35.646618Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39025 service_binding=http://127.0.0.1:39025/ request_id=a15ee6d9-3928-482e-9391-020a5521bc06 +2026-11-21T13:42:35.646628Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39025 service_binding=http://127.0.0.1:39025/ +2026-11-21T13:42:35.647081Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:33255 service_binding=http://127.0.0.1:33255/ request_id=5ce872c7-f148-44e8-a037-1f18b4f4e56a +2026-11-21T13:42:35.647091Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:33255 service_binding=http://127.0.0.1:33255/ +2026-11-21T13:42:35.648135Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:36363 service_binding=http://127.0.0.1:36363/ request_id=b953a334-848f-4cef-94e3-22c79f4c4518 +2026-11-21T13:42:35.648149Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:36363 service_binding=http://127.0.0.1:36363/ +2026-11-21T13:42:35.651552Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:33255 service_binding=http://127.0.0.1:33255/ request_id=7eaa1fde-b5fa-405a-b9ab-398793c13453 +2026-11-21T13:42:35.651562Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:33255 service_binding=http://127.0.0.1:33255/ +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_query_param::it_should_authenticate_requests_when_the_token_is_provided_as_a_query_param ... ok +test server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_auth_key_to_delete_does_not_exist ... ok +test server::v1::contract::context::auth_key::should_fail_generating_a_new_auth_key_when_the_provided_key_is_invalid ... ok +test server::v1::contract::context::auth_key::should_not_allow_generating_a_new_auth_key_for_unauthenticated_users ... ok +test server::v1::contract::context::auth_key::should_fail_deleting_an_auth_key_when_the_key_id_is_invalid ... ok +test server::v1::contract::authentication::given_that_not_token_is_provided::it_should_not_authenticate_requests_when_the_token_is_missing ... ok +test server::v1::contract::context::stats::should_allow_getting_tracker_statistics ... ok +2026-11-21T13:42:36.626636Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:33987 service_binding=http://127.0.0.1:33987/ request_id=8b4b387f-3fe2-4b1d-8c7a-84f4a2fcfc24 +2026-11-21T13:42:36.626653Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:33987 service_binding=http://127.0.0.1:33987/ +test server::v1::contract::context::auth_key::should_not_allow_deleting_an_auth_key_for_unauthenticated_users ... ok +2026-11-21T13:42:36.630814Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:33987 service_binding=http://127.0.0.1:33987/ request_id=0b608d06-b2c0-4782-a000-df794d26ce1d +2026-11-21T13:42:36.630824Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:33987 service_binding=http://127.0.0.1:33987/ +test server::v1::contract::context::auth_key::should_allow_generating_a_new_random_auth_key ... ok +test server::v1::contract::context::auth_key::should_allow_reloading_keys ... ok +test server::v1::contract::context::auth_key::should_allow_uploading_a_preexisting_auth_key ... ok +test server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_fail_when_the_auth_key_cannot_be_generated ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_authentication_header::it_should_not_authenticate_requests_when_the_token_is_empty ... ok +test server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_generated ... ok +test server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_not_allow_generating_a_new_auth_key_for_unauthenticated_users ... ok +test server::v1::contract::authentication::given_that_token_is_provided_via_get_param_and_authentication_header::it_should_authenticate_requests_using_the_token_provided_in_the_authentication_header ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_authentication_header::it_should_authenticate_requests_when_the_token_is_provided_in_the_authentication_header ... ok +test server::v1::contract::context::auth_key::should_reject_auth_key_requests_when_private_mode_is_disabled_without_database_access ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_query_param::it_should_not_authenticate_requests_when_the_token_is_empty ... ok +test server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_deleted ... ok +test server::v1::contract::context::auth_key::should_fail_when_keys_cannot_be_reloaded ... ok +test server::v1::contract::context::stats::should_expose_an_enabled_zero_value_persisted_metric ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_query_param::it_should_allow_the_token_query_param_to_be_at_any_position_in_the_url_query ... ok +test server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_same_auth_key_is_uploaded_twice ... ok +test server::v1::contract::context::auth_key::should_allow_deleting_an_auth_key ... ok +test server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_allow_generating_a_new_auth_key ... ok +test server::v1::contract::context::health_check::health_check_endpoint_should_return_status_ok_if_api_is_running ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_authentication_header::it_should_not_authenticate_requests_when_the_token_is_invalid ... ok +test server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_fail_generating_a_new_auth_key_when_the_key_duration_is_invalid ... ok +test server::v1::contract::context::auth_key::should_fail_generating_a_new_auth_key_when_the_key_duration_is_invalid ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_query_param::it_should_not_authenticate_requests_when_the_token_is_invalid ... ok +test server::v1::contract::context::auth_key::should_not_allow_reloading_keys_for_unauthenticated_users ... ok +2026-11-21T13:42:36.725069Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39589 service_binding=http://127.0.0.1:39589/ request_id=ca953f54-7a46-4f3b-b82a-67b966dc6202 +2026-11-21T13:42:36.725092Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39589 service_binding=http://127.0.0.1:39589/ +2026-11-21T13:42:36.728142Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39589 service_binding=http://127.0.0.1:39589/ request_id=65159290-30ec-4c40-9edc-05c6e6b5c268 +2026-11-21T13:42:36.728160Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39589 service_binding=http://127.0.0.1:39589/ +2026-11-21T13:42:36.732938Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:45459 service_binding=http://127.0.0.1:45459/ request_id=96c0d6a6-f060-4316-afc4-7d3a0dfc7295 +2026-11-21T13:42:36.732953Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:45459 service_binding=http://127.0.0.1:45459/ +2026-11-21T13:42:36.734358Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:33927 service_binding=http://127.0.0.1:33927/ request_id=3b65cdfb-7743-4cf3-9eac-f900daded0ac +2026-11-21T13:42:36.734374Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:33927 service_binding=http://127.0.0.1:33927/ +2026-11-21T13:42:36.734747Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:34379 service_binding=http://127.0.0.1:34379/ request_id=25785e60-bc60-4cb8-8d1a-c21aebf60ec3 +2026-11-21T13:42:36.734759Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:34379 service_binding=http://127.0.0.1:34379/ +2026-11-21T13:42:36.736567Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:43259 service_binding=http://127.0.0.1:43259/ request_id=f13839d7-2d05-4a32-961e-120a90601c6d +2026-11-21T13:42:36.736580Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:43259 service_binding=http://127.0.0.1:43259/ +2026-11-21T13:42:36.736750Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39929 service_binding=http://127.0.0.1:39929/ request_id=a24ee927-8fd0-4a09-a0c6-e88f783efd0a +2026-11-21T13:42:36.736762Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39929 service_binding=http://127.0.0.1:39929/ +2026-11-21T13:42:36.738819Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39233 service_binding=http://127.0.0.1:39233/ request_id=aa3c8ea3-5658-4c2e-84e8-0228f71ffa8e +2026-11-21T13:42:36.738829Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39233 service_binding=http://127.0.0.1:39233/ +2026-11-21T13:42:36.739672Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:33927 service_binding=http://127.0.0.1:33927/ request_id=041fc5f9-b701-43a3-aa94-946826e63353 +2026-11-21T13:42:36.739681Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:33927 service_binding=http://127.0.0.1:33927/ +2026-11-21T13:42:36.740327Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39929 service_binding=http://127.0.0.1:39929/ request_id=c27d0b0b-38f3-4be9-861a-09408eff5790 +2026-11-21T13:42:36.740341Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39929 service_binding=http://127.0.0.1:39929/ +2026-11-21T13:42:36.743397Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39233 service_binding=http://127.0.0.1:39233/ request_id=084c398f-c176-4fed-b078-b2fa39c2d581 +2026-11-21T13:42:36.743407Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39233 service_binding=http://127.0.0.1:39233/ +test server::v1::contract::context::stats::should_expose_completed_download_availability_and_omit_the_persisted_metric_when_disabled ... ok +test server::v1::contract::context::torrent::should_allow_getting_a_list_of_torrents_providing_infohashes ... ok +test server::v1::contract::context::stats::should_not_allow_getting_tracker_statistics_for_unauthenticated_users ... ok +test server::v1::contract::context::torrent::should_allow_getting_a_torrent_info ... ok +test server::v1::contract::context::torrent::should_allow_getting_all_torrents ... ok +test server::v1::contract::context::torrent::should_allow_limiting_the_torrents_in_the_result ... ok +test server::v1::contract::context::torrent::should_allow_the_torrents_result_pagination ... ok +test server::v1::contract::context::torrent::should_fail_getting_a_torrent_info_when_the_provided_infohash_is_invalid ... ok +test server::v1::contract::context::torrent::should_fail_while_getting_a_torrent_info_when_the_torrent_does_not_exist ... ok +test server::v1::contract::context::whitelist::should_allow_whitelisting_a_torrent_that_has_been_already_whitelisted ... ok +test server::v1::contract::context::whitelist::should_allow_removing_a_torrent_from_the_whitelist ... ok +test server::v1::contract::context::whitelist::should_not_allow_whitelisting_a_torrent_for_unauthenticated_users ... ok +test server::v1::contract::context::torrent::should_include_equal_v1_peer_timestamp_fields_in_the_raw_torrent_json_response ... ok +test server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_whitelisted ... ok +test server::v1::contract::context::whitelist::should_reject_whitelist_requests_when_listed_mode_is_disabled_without_database_access ... ok +test server::v1::contract::context::whitelist::should_fail_when_the_whitelist_cannot_be_reloaded_from_the_database ... ok +test server::v1::contract::context::whitelist::should_allow_reload_the_whitelist_from_the_database ... ok +test server::v1::contract::context::whitelist::should_allow_whitelisting_a_torrent ... ok +test server::v1::contract::context::whitelist::should_not_fail_trying_to_remove_a_non_whitelisted_torrent_from_the_whitelist ... ok +test server::v1::contract::context::torrent::should_fail_getting_torrents_when_the_offset_query_parameter_cannot_be_parsed ... ok +test server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_removed_from_the_whitelist ... ok +test server::v1::contract::context::torrent::should_fail_getting_torrents_when_the_limit_query_parameter_cannot_be_parsed ... ok +test server::v1::contract::context::torrent::should_not_allow_getting_a_torrent_info_for_unauthenticated_users ... ok +test server::v1::contract::context::whitelist::should_not_allow_removing_a_torrent_from_the_whitelist_for_unauthenticated_users ... ok +test server::v1::contract::context::torrent::should_not_allow_getting_torrents_for_unauthenticated_users ... ok +test server::v1::contract::context::whitelist::should_fail_whitelisting_a_torrent_when_the_provided_infohash_is_invalid ... ok +test server::v1::contract::context::torrent::should_fail_getting_torrents_when_the_info_hash_parameter_is_invalid ... ok +test server::v1::contract::context::whitelist::should_fail_removing_a_torrent_from_the_whitelist_when_the_provided_infohash_is_invalid ... ok + +test result: ok. 60 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.37s diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-axum-http-server.txt b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-axum-http-server.txt new file mode 100644 index 0000000000..90abed7365 --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-axum-http-server.txt @@ -0,0 +1,56 @@ + Compiling torrust-tracker-primitives v3.1.0 (/packages/primitives) + Compiling torrust-tracker-client-lib v0.1.0 (/packages/tracker-client) + Compiling torrust-tracker-configuration v3.0.0 (/packages/configuration) + Compiling torrust-tracker-swarm-coordination-registry v0.1.0 (/packages/swarm-coordination-registry) + Compiling torrust-tracker-core v0.1.0 (/packages/tracker-core) + Compiling torrust-tracker-axum-server v0.1.0 (/packages/axum-server) + Compiling torrust-tracker-test-helpers v3.0.0 (/packages/test-helpers) + Compiling torrust-tracker-http-core v0.1.0 (/packages/http-core) + Compiling torrust-tracker-axum-http-server v0.1.0 (/packages/axum-http-server) + Finished `test` profile [optimized + debuginfo] target(s) in 2.69s + Running tests/integration.rs (target/debug/build/torrust-tracker-axum-http-server/2147d666273a05bb/out/integration-2147d666273a05bb) + +running 14 tests +2026-11-21T13:32:37.933468Z ERROR torrust_tracker_core::whitelist::authorization: error=The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted, packages/tracker-core/src/whitelist/authorization.rs:61:23 +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_with_a_short_peer_id ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_without_the_info_hash_param ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_without_query_params ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_with_an_unparsable_query ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::a_scrape_without_query_params ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_with_an_invalid_numwant_param ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_with_a_malformed_key ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_tracker_behind_a_reverse_proxy_without_the_x_forwarded_for_header ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_listed_tracker_for_a_torrent_that_is_not_whitelisted ... FAILED +test server::v1::contract::failure_reasons_hold_no_source_path::a_scrape_with_a_short_info_hash ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::a_scrape_without_the_info_hash_param ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_with_a_short_info_hash ... ok +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_with_an_unregistered_key ... FAILED +test server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_without_a_key ... FAILED + +failures: + +---- server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_listed_tracker_for_a_torrent_that_is_not_whitelisted stdout ---- + +thread 'server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_listed_tracker_for_a_torrent_that_is_not_whitelisted' panicked at packages/axum-http-server/tests/server/v1/contract/failure_reasons_hold_no_source_path.rs:190:5: +the failure reason must not hold a source path, but it contains ".rs:": "Tracker whitelist error: The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted, packages/tracker-core/src/whitelist/authorization.rs:61:23" +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + +---- server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_with_an_unregistered_key stdout ---- + +thread 'server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_with_an_unregistered_key' panicked at packages/axum-http-server/tests/server/v1/contract/failure_reasons_hold_no_source_path.rs:217:5: +the failure reason must not hold a source path, but it contains ".rs:": "Tracker authentication error: Failed to read key: YZSl4lMZupRuOpSRC3krIKR5BPB14nrJ, packages/tracker-core/src/authentication/service.rs:98:27" + +---- server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_without_a_key stdout ---- + +thread 'server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_without_a_key' panicked at packages/axum-http-server/tests/server/v1/contract/failure_reasons_hold_no_source_path.rs:205:5: +the failure reason must not hold a source path, but it contains ".rs:": "Tracker authentication error: Missing authentication key, packages/http-core/src/services/announce.rs:308:27" + + +failures: + server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_listed_tracker_for_a_torrent_that_is_not_whitelisted + server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_with_an_unregistered_key + server::v1::contract::failure_reasons_hold_no_source_path::an_announce_to_a_private_tracker_without_a_key + +test result: FAILED. 11 passed; 3 failed; 0 ignored; 0 measured; 63 filtered out; finished in 1.08s + +error: test failed, to rerun pass `-p torrust-tracker-axum-http-server --test integration` diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-axum-rest-api-server.txt b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-axum-rest-api-server.txt new file mode 100644 index 0000000000..29153d1c4d --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-axum-rest-api-server.txt @@ -0,0 +1,218 @@ + Compiling tokio-rustls v0.26.6 + Compiling sqlx-core v0.8.6 + Compiling tower-http v0.6.11 + Compiling torrust-tracker-primitives v3.1.0 (/packages/primitives) + Compiling axum-extra v0.12.6 + Compiling torrust-server-lib v0.6.0 + Compiling hyper-rustls v0.27.10 + Compiling axum-server v0.9.2 + Compiling reqwest v0.13.5 + Compiling torrust-tracker-configuration v3.0.0 (/packages/configuration) + Compiling torrust-tracker-swarm-coordination-registry v0.1.0 (/packages/swarm-coordination-registry) + Compiling torrust-tracker-rest-api-application v0.1.0 (/packages/rest-api-application) + Compiling torrust-tracker-client-lib v0.1.0 (/packages/tracker-client) + Compiling torrust-tracker-rest-api-client v0.1.0 (/packages/rest-api-client) + Compiling sqlx-sqlite v0.8.6 + Compiling sqlx-mysql v0.8.6 + Compiling sqlx-postgres v0.8.6 + Compiling torrust-tracker-axum-server v0.1.0 (/packages/axum-server) + Compiling torrust-tracker-test-helpers v3.0.0 (/packages/test-helpers) + Compiling sqlx v0.8.6 + Compiling torrust-tracker-core v0.1.0 (/packages/tracker-core) + Compiling torrust-tracker-udp-core v0.1.0 (/packages/udp-core) + Compiling torrust-tracker-http-core v0.1.0 (/packages/http-core) + Compiling torrust-tracker-udp-server v0.1.0 (/packages/udp-server) + Compiling torrust-tracker-rest-api-runtime-adapter v0.1.0 (/packages/rest-api-runtime-adapter) + Compiling torrust-tracker-axum-rest-api-server v0.1.0 (/packages/axum-rest-api-server) + Finished `test` profile [optimized + debuginfo] target(s) in 11.06s + Running tests/integration.rs (target/debug/build/torrust-tracker-axum-rest-api-server/7bee9a1d877ebe10/out/integration-7bee9a1d877ebe10) + +running 60 tests +2026-11-21T13:32:50.346153Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:34819 service_binding=http://127.0.0.1:34819/ request_id=caac26d9-9ae9-46a3-a816-690b396b1b68 +2026-11-21T13:32:50.346171Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:34819 service_binding=http://127.0.0.1:34819/ +2026-11-21T13:32:50.361044Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:45759 service_binding=http://127.0.0.1:45759/ request_id=81344616-900c-4c86-bc70-47eb6ec8abba +2026-11-21T13:32:50.361056Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:45759 service_binding=http://127.0.0.1:45759/ +2026-11-21T13:32:50.362985Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:42579 service_binding=http://127.0.0.1:42579/ request_id=68e0752c-7ee5-43d2-bd56-5d5a3223fa93 +2026-11-21T13:32:50.362999Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:42579 service_binding=http://127.0.0.1:42579/ +test server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_same_auth_key_is_uploaded_twice ... FAILED +2026-11-21T13:32:50.366472Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:34699 service_binding=http://127.0.0.1:34699/ request_id=328c127e-6640-4402-bc77-fec8822153cf +2026-11-21T13:32:50.366484Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:34699 service_binding=http://127.0.0.1:34699/ +test server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_fail_when_the_auth_key_cannot_be_generated ... FAILED +2026-11-21T13:32:50.369930Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:38107 service_binding=http://127.0.0.1:38107/ request_id=cf1af031-4fb1-49c6-98cb-1607e359f4e4 +2026-11-21T13:32:50.369945Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:38107 service_binding=http://127.0.0.1:38107/ +2026-11-21T13:32:50.374599Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:38107 service_binding=http://127.0.0.1:38107/ request_id=ed0a5b48-e419-4c76-8598-ca11c81874b7 +2026-11-21T13:32:50.374611Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:38107 service_binding=http://127.0.0.1:38107/ +2026-11-21T13:32:50.383800Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:45759 service_binding=http://127.0.0.1:45759/ request_id=45b961e2-bb20-4413-9636-10ed0def7baa +2026-11-21T13:32:50.383817Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:45759 service_binding=http://127.0.0.1:45759/ +2026-11-21T13:32:50.385378Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:46195 service_binding=http://127.0.0.1:46195/ request_id=2187f69a-29f4-4a89-84dc-de04fa828f05 +2026-11-21T13:32:50.385391Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:46195 service_binding=http://127.0.0.1:46195/ +2026-11-21T13:32:50.385562Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:41279 service_binding=http://127.0.0.1:41279/ request_id=f76ed38f-fcb9-482a-b034-9570c1a1fa17 +2026-11-21T13:32:50.385577Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:41279 service_binding=http://127.0.0.1:41279/ +2026-11-21T13:32:50.386194Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39121 service_binding=http://127.0.0.1:39121/ request_id=5456a353-0e67-4c39-abaf-0bca2ec4ad54 +2026-11-21T13:32:50.386204Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39121 service_binding=http://127.0.0.1:39121/ +test server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_auth_key_to_delete_does_not_exist ... FAILED +2026-11-21T13:32:50.389005Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:33407 service_binding=http://127.0.0.1:33407/ request_id=72c1314e-9a44-4a7a-aa00-ad39bb5360cc +2026-11-21T13:32:50.389017Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:33407 service_binding=http://127.0.0.1:33407/ +2026-11-21T13:32:50.389501Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:41279 service_binding=http://127.0.0.1:41279/ request_id=bf68cb1d-2e5c-43a9-98b4-bae1085e262a +2026-11-21T13:32:50.389509Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:41279 service_binding=http://127.0.0.1:41279/ +2026-11-21T13:32:50.389725Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:36681 service_binding=http://127.0.0.1:36681/ request_id=d7bc5ef3-882d-4f2b-96ae-676b7d7b9ea2 +2026-11-21T13:32:50.389734Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:36681 service_binding=http://127.0.0.1:36681/ +test server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_generated ... FAILED +2026-11-21T13:32:50.390955Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:38579 service_binding=http://127.0.0.1:38579/ request_id=738ecda9-822e-4175-8a0a-209e1915b41b +2026-11-21T13:32:50.390971Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:38579 service_binding=http://127.0.0.1:38579/ +test server::v1::contract::context::auth_key::should_fail_when_keys_cannot_be_reloaded ... FAILED +2026-11-21T13:32:50.392950Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:46201 service_binding=http://127.0.0.1:46201/ request_id=4fd6c266-a284-4cd6-9e50-df4570ce7952 +2026-11-21T13:32:50.392964Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:46201 service_binding=http://127.0.0.1:46201/ +2026-11-21T13:32:50.393105Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:35981 service_binding=http://127.0.0.1:35981/ request_id=9efee100-25d0-4de1-adb4-15542f211bd4 +2026-11-21T13:32:50.393117Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:35981 service_binding=http://127.0.0.1:35981/ +2026-11-21T13:32:50.393201Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:44467 service_binding=http://127.0.0.1:44467/ request_id=4e97c713-7056-44ac-8f3e-b9afb696b214 +2026-11-21T13:32:50.393215Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:44467 service_binding=http://127.0.0.1:44467/ +2026-11-21T13:32:50.393300Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:46195 service_binding=http://127.0.0.1:46195/ request_id=f0d27054-58e4-4d9f-af6f-3d7caf62f1ac +2026-11-21T13:32:50.393312Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:46195 service_binding=http://127.0.0.1:46195/ +2026-11-21T13:32:50.393838Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:41501 service_binding=http://127.0.0.1:41501/ request_id=74ce0f0b-9487-43d1-a76c-9785e41849ca +2026-11-21T13:32:50.393848Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:41501 service_binding=http://127.0.0.1:41501/ +test server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_deleted ... FAILED +2026-11-21T13:32:50.401561Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39749 service_binding=http://127.0.0.1:39749/ request_id=a1bcbaeb-0704-46f4-87c5-68610a7438bf +2026-11-21T13:32:50.401586Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39749 service_binding=http://127.0.0.1:39749/ +2026-11-21T13:32:50.406326Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:39749 service_binding=http://127.0.0.1:39749/ request_id=4e8d9f5e-eb14-469a-a9bf-1dccd8c4ce03 +2026-11-21T13:32:50.406344Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:39749 service_binding=http://127.0.0.1:39749/ +test server::v1::contract::authentication::given_that_not_token_is_provided::it_should_not_authenticate_requests_when_the_token_is_missing ... ok +test server::v1::contract::context::auth_key::should_allow_uploading_a_preexisting_auth_key ... ok +test server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_allow_generating_a_new_auth_key ... ok +test server::v1::contract::context::auth_key::should_not_allow_reloading_keys_for_unauthenticated_users ... ok +test server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_not_allow_generating_a_new_auth_key_for_unauthenticated_users ... ok +test server::v1::contract::context::auth_key::should_allow_deleting_an_auth_key ... ok +test server::v1::contract::context::health_check::health_check_endpoint_should_return_status_ok_if_api_is_running ... ok +test server::v1::contract::context::auth_key::should_allow_generating_a_new_random_auth_key ... ok +test server::v1::contract::context::auth_key::should_not_allow_deleting_an_auth_key_for_unauthenticated_users ... ok +test server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_fail_generating_a_new_auth_key_when_the_key_duration_is_invalid ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_authentication_header::it_should_not_authenticate_requests_when_the_token_is_invalid ... ok +test server::v1::contract::context::stats::should_expose_completed_download_availability_and_omit_the_persisted_metric_when_disabled ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_query_param::it_should_authenticate_requests_when_the_token_is_provided_as_a_query_param ... ok +test server::v1::contract::context::auth_key::should_fail_generating_a_new_auth_key_when_the_key_duration_is_invalid ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_authentication_header::it_should_authenticate_requests_when_the_token_is_provided_in_the_authentication_header ... ok +test server::v1::contract::context::stats::should_allow_getting_tracker_statistics ... ok +test server::v1::contract::context::auth_key::should_allow_reloading_keys ... ok +test server::v1::contract::authentication::given_that_token_is_provided_via_get_param_and_authentication_header::it_should_authenticate_requests_using_the_token_provided_in_the_authentication_header ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_query_param::it_should_not_authenticate_requests_when_the_token_is_invalid ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_query_param::it_should_not_authenticate_requests_when_the_token_is_empty ... ok +test server::v1::contract::context::stats::should_not_allow_getting_tracker_statistics_for_unauthenticated_users ... ok +test server::v1::contract::context::auth_key::should_not_allow_generating_a_new_auth_key_for_unauthenticated_users ... ok +test server::v1::contract::context::auth_key::should_reject_auth_key_requests_when_private_mode_is_disabled_without_database_access ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_authentication_header::it_should_not_authenticate_requests_when_the_token_is_empty ... ok +test server::v1::contract::context::auth_key::should_fail_generating_a_new_auth_key_when_the_provided_key_is_invalid ... ok +test server::v1::contract::context::stats::should_expose_an_enabled_zero_value_persisted_metric ... ok +test server::v1::contract::authentication::given_that_the_token_is_only_provided_in_the_query_param::it_should_allow_the_token_query_param_to_be_at_any_position_in_the_url_query ... ok +test server::v1::contract::context::auth_key::should_fail_deleting_an_auth_key_when_the_key_id_is_invalid ... ok +test server::v1::contract::context::torrent::should_allow_getting_a_list_of_torrents_providing_infohashes ... ok +test server::v1::contract::context::torrent::should_allow_getting_a_torrent_info ... ok +test server::v1::contract::context::torrent::should_allow_getting_all_torrents ... ok +test server::v1::contract::context::torrent::should_allow_limiting_the_torrents_in_the_result ... ok +2026-11-21T13:32:51.481974Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:35385 service_binding=http://127.0.0.1:35385/ request_id=110b8b66-ed6c-4864-ba43-2e689a0ec2fe +2026-11-21T13:32:51.482010Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:35385 service_binding=http://127.0.0.1:35385/ +2026-11-21T13:32:51.482519Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:44221 service_binding=http://127.0.0.1:44221/ request_id=470b56ca-37da-4882-b6f1-269a1750c2ac +2026-11-21T13:32:51.482530Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:44221 service_binding=http://127.0.0.1:44221/ +2026-11-21T13:32:51.488155Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:35385 service_binding=http://127.0.0.1:35385/ request_id=0d7ed52e-942f-412a-9916-a2ec38bf6303 +2026-11-21T13:32:51.488183Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:35385 service_binding=http://127.0.0.1:35385/ +2026-11-21T13:32:51.488155Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:44221 service_binding=http://127.0.0.1:44221/ request_id=92b5f27d-82f7-4aa2-a568-269c65725c24 +2026-11-21T13:32:51.488196Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:44221 service_binding=http://127.0.0.1:44221/ +2026-11-21T13:32:51.492676Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:43187 service_binding=http://127.0.0.1:43187/ request_id=3ff265b7-febb-477c-ac8f-a24f980cd157 +2026-11-21T13:32:51.492694Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:43187 service_binding=http://127.0.0.1:43187/ +2026-11-21T13:32:51.493439Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:34031 service_binding=http://127.0.0.1:34031/ request_id=94c49fa7-b4a5-4090-8a5c-6a7a7f04ee49 +2026-11-21T13:32:51.493449Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:34031 service_binding=http://127.0.0.1:34031/ +test server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_removed_from_the_whitelist ... FAILED +2026-11-21T13:32:51.495003Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:36209 service_binding=http://127.0.0.1:36209/ request_id=941803b4-6c34-4c5d-9700-58764680718e +2026-11-21T13:32:51.495015Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:36209 service_binding=http://127.0.0.1:36209/ +2026-11-21T13:32:51.495213Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:43187 service_binding=http://127.0.0.1:43187/ request_id=8805e430-0b81-4684-9b2d-2fe3931440cb +2026-11-21T13:32:51.495222Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:43187 service_binding=http://127.0.0.1:43187/ +2026-11-21T13:32:51.498375Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:36209 service_binding=http://127.0.0.1:36209/ request_id=36e256c2-be2b-46f8-ba4d-83697aff30ee +2026-11-21T13:32:51.498385Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:36209 service_binding=http://127.0.0.1:36209/ +2026-11-21T13:32:51.499267Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:41209 service_binding=http://127.0.0.1:41209/ request_id=0fdfd869-4616-4bf7-9e77-8f2c71969072 +2026-11-21T13:32:51.499282Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:41209 service_binding=http://127.0.0.1:41209/ +2026-11-21T13:32:51.500281Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:38057 service_binding=http://127.0.0.1:38057/ request_id=9c87fbfe-55d3-4170-9b54-7d87c409a2fa +2026-11-21T13:32:51.500294Z ERROR API: response failed failure_classification=Status code: 500 Internal Server Error latency=0 ms server_socket_addr=127.0.0.1:38057 service_binding=http://127.0.0.1:38057/ +test server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_whitelisted ... FAILED +test server::v1::contract::context::whitelist::should_fail_when_the_whitelist_cannot_be_reloaded_from_the_database ... FAILED +test server::v1::contract::context::torrent::should_allow_the_torrents_result_pagination ... ok +test server::v1::contract::context::torrent::should_fail_getting_torrents_when_the_info_hash_parameter_is_invalid ... ok +test server::v1::contract::context::torrent::should_fail_getting_torrents_when_the_limit_query_parameter_cannot_be_parsed ... ok +test server::v1::contract::context::torrent::should_fail_getting_a_torrent_info_when_the_provided_infohash_is_invalid ... ok +test server::v1::contract::context::torrent::should_fail_getting_torrents_when_the_offset_query_parameter_cannot_be_parsed ... ok +test server::v1::contract::context::whitelist::should_allow_reload_the_whitelist_from_the_database ... ok +test server::v1::contract::context::torrent::should_fail_while_getting_a_torrent_info_when_the_torrent_does_not_exist ... ok +test server::v1::contract::context::torrent::should_not_allow_getting_torrents_for_unauthenticated_users ... ok +test server::v1::contract::context::torrent::should_include_equal_v1_peer_timestamp_fields_in_the_raw_torrent_json_response ... ok +test server::v1::contract::context::torrent::should_not_allow_getting_a_torrent_info_for_unauthenticated_users ... ok +test server::v1::contract::context::whitelist::should_reject_whitelist_requests_when_listed_mode_is_disabled_without_database_access ... ok +test server::v1::contract::context::whitelist::should_allow_whitelisting_a_torrent_that_has_been_already_whitelisted ... ok +test server::v1::contract::context::whitelist::should_not_allow_whitelisting_a_torrent_for_unauthenticated_users ... ok +test server::v1::contract::context::whitelist::should_allow_removing_a_torrent_from_the_whitelist ... ok +test server::v1::contract::context::whitelist::should_allow_whitelisting_a_torrent ... ok +test server::v1::contract::context::whitelist::should_not_fail_trying_to_remove_a_non_whitelisted_torrent_from_the_whitelist ... ok +test server::v1::contract::context::whitelist::should_not_allow_removing_a_torrent_from_the_whitelist_for_unauthenticated_users ... ok +test server::v1::contract::context::whitelist::should_fail_removing_a_torrent_from_the_whitelist_when_the_provided_infohash_is_invalid ... ok +test server::v1::contract::context::whitelist::should_fail_whitelisting_a_torrent_when_the_provided_infohash_is_invalid ... ok + +failures: + +---- server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_same_auth_key_is_uploaded_twice stdout ---- + +thread 'server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_same_auth_key_is_uploaded_twice' panicked at packages/axum-rest-api-server/tests/server/v1/asserts.rs:180:5: +the error message must not hold a source path, but it contains ".rs:": "Unhandled rejection: Err { reason: \"failed to add key: The Sqlite3 query was malformed: error returned from database: (code: 2067) UNIQUE constraint failed: keys.key, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:74:22, packages/tracker-core/src/authentication/handler.rs:103:50\" }" +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + +---- server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_fail_when_the_auth_key_cannot_be_generated stdout ---- + +thread 'server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_fail_when_the_auth_key_cannot_be_generated' panicked at packages/axum-rest-api-server/tests/server/v1/asserts.rs:180:5: +the error message must not hold a source path, but it contains ".rs:": "Unhandled rejection: Err { reason: \"failed to generate key: The Sqlite3 query was malformed: error returned from database: (code: 1) no such table: keys, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:74:22\" }" + +---- server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_auth_key_to_delete_does_not_exist stdout ---- + +thread 'server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_auth_key_to_delete_does_not_exist' panicked at packages/axum-rest-api-server/tests/server/v1/asserts.rs:180:5: +the error message must not hold a source path, but it contains ".rs:": "Unhandled rejection: Err { reason: \"failed to delete key: Failed to remove record from Sqlite3 database, error-code: 0, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:108:27\" }" + +---- server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_generated stdout ---- + +thread 'server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_generated' panicked at packages/axum-rest-api-server/tests/server/v1/asserts.rs:180:5: +the error message must not hold a source path, but it contains ".rs:": "Unhandled rejection: Err { reason: \"failed to add key: The Sqlite3 query was malformed: error returned from database: (code: 1) no such table: keys, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:74:22, packages/tracker-core/src/authentication/handler.rs:141:46\" }" + +---- server::v1::contract::context::auth_key::should_fail_when_keys_cannot_be_reloaded stdout ---- + +thread 'server::v1::contract::context::auth_key::should_fail_when_keys_cannot_be_reloaded' panicked at packages/axum-rest-api-server/tests/server/v1/asserts.rs:180:5: +the error message must not hold a source path, but it contains ".rs:": "Unhandled rejection: Err { reason: \"failed to reload keys: The Sqlite3 query was malformed: error returned from database: (code: 1) no such table: keys, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:15:20\" }" + +---- server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_deleted stdout ---- + +thread 'server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_deleted' panicked at packages/axum-rest-api-server/tests/server/v1/asserts.rs:180:5: +the error message must not hold a source path, but it contains ".rs:": "Unhandled rejection: Err { reason: \"failed to delete key: The Sqlite3 query was malformed: error returned from database: (code: 1) no such table: keys, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:96:23\" }" + +---- server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_removed_from_the_whitelist stdout ---- + +thread 'server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_removed_from_the_whitelist' panicked at packages/axum-rest-api-server/tests/server/v1/asserts.rs:180:5: +the error message must not hold a source path, but it contains ".rs:": "Unhandled rejection: Err { reason: \"failed to remove torrent from whitelist: The Sqlite3 query was malformed: error returned from database: (code: 1) no such table: whitelist, packages/tracker-core/src/databases/driver/sqlite/whitelist_store.rs:32:25\" }" + +---- server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_whitelisted stdout ---- + +thread 'server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_whitelisted' panicked at packages/axum-rest-api-server/tests/server/v1/asserts.rs:180:5: +the error message must not hold a source path, but it contains ".rs:": "Unhandled rejection: Err { reason: \"failed to whitelist torrent: The Sqlite3 query was malformed: error returned from database: (code: 1) no such table: whitelist, packages/tracker-core/src/databases/driver/sqlite/whitelist_store.rs:32:25\" }" + +---- server::v1::contract::context::whitelist::should_fail_when_the_whitelist_cannot_be_reloaded_from_the_database stdout ---- + +thread 'server::v1::contract::context::whitelist::should_fail_when_the_whitelist_cannot_be_reloaded_from_the_database' panicked at packages/axum-rest-api-server/tests/server/v1/asserts.rs:180:5: +the error message must not hold a source path, but it contains ".rs:": "Unhandled rejection: Err { reason: \"failed to reload whitelist: The Sqlite3 query was malformed: error returned from database: (code: 1) no such table: whitelist, packages/tracker-core/src/databases/driver/sqlite/whitelist_store.rs:15:20\" }" + + +failures: + server::v1::contract::context::auth_key::deprecated_generate_key_endpoint::should_fail_when_the_auth_key_cannot_be_generated + server::v1::contract::context::auth_key::should_fail_when_keys_cannot_be_reloaded + server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_deleted + server::v1::contract::context::auth_key::should_fail_when_the_auth_key_cannot_be_generated + server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_auth_key_to_delete_does_not_exist + server::v1::contract::context::auth_key::should_fail_without_a_source_path_when_the_same_auth_key_is_uploaded_twice + server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_removed_from_the_whitelist + server::v1::contract::context::whitelist::should_fail_when_the_torrent_cannot_be_whitelisted + server::v1::contract::context::whitelist::should_fail_when_the_whitelist_cannot_be_reloaded_from_the_database + +test result: FAILED. 51 passed; 9 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.45s + +error: test failed, to rerun pass `-p torrust-tracker-axum-rest-api-server --test integration` diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-driver-steps.txt b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-driver-steps.txt new file mode 100644 index 0000000000..719b20b269 --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-driver-steps.txt @@ -0,0 +1,24 @@ +=== step moved first: handling_authentication_keys::it_should_fail_without_a_source_path_trying_to_remove_a_missing_key +started 15:40:31 +$ cargo test -p torrust-tracker-core --lib databases::driver::sqlite::tests::run_sqlite_driver_tests +test databases::driver::sqlite::tests::run_sqlite_driver_tests ... FAILED +thread 'databases::driver::sqlite::tests::run_sqlite_driver_tests' panicked at packages/tracker-core/src/databases/driver/mod.rs:290:13: +the error message must not hold a source path, but it contains ".rs:": "Failed to remove record from Sqlite3 database, error-code: 0, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:108:27" +test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 159 filtered out; finished in 0.00s +ended 15:40:35 +=== step moved first: handling_the_whitelist::it_should_fail_without_a_source_path_trying_to_add_the_same_infohash_twice +started 15:40:35 +$ cargo test -p torrust-tracker-core --lib databases::driver::sqlite::tests::run_sqlite_driver_tests +test databases::driver::sqlite::tests::run_sqlite_driver_tests ... FAILED +thread 'databases::driver::sqlite::tests::run_sqlite_driver_tests' panicked at packages/tracker-core/src/databases/driver/mod.rs:345:13: +the error message must not hold a source path, but it contains ".rs:": "The Sqlite3 query was malformed: error returned from database: (code: 2067) UNIQUE constraint failed: whitelist.info_hash, packages/tracker-core/src/databases/driver/sqlite/whitelist_store.rs:50:22" +test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 159 filtered out; finished in 0.00s +ended 15:40:36 +=== step moved first: handling_the_whitelist::it_should_fail_without_a_source_path_trying_to_remove_a_missing_infohash +started 15:40:36 +$ cargo test -p torrust-tracker-core --lib databases::driver::sqlite::tests::run_sqlite_driver_tests +test databases::driver::sqlite::tests::run_sqlite_driver_tests ... FAILED +thread 'databases::driver::sqlite::tests::run_sqlite_driver_tests' panicked at packages/tracker-core/src/databases/driver/mod.rs:353:13: +the error message must not hold a source path, but it contains ".rs:": "Failed to remove record from Sqlite3 database, error-code: 0, packages/tracker-core/src/databases/driver/sqlite/whitelist_store.rs:83:27" +test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 159 filtered out; finished in 0.00s +ended 15:40:38 diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-tracker-core.txt b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-tracker-core.txt new file mode 100644 index 0000000000..549ad4415b --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-tracker-core.txt @@ -0,0 +1,216 @@ + Finished `test` profile [optimized + debuginfo] target(s) in 0.18s + Running unittests src/lib.rs (target/debug/build/torrust-tracker-core/d6b78cd3a90cd77f/out/torrust_tracker_core-d6b78cd3a90cd77f) + +running 160 tests +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_client_ip_is_a_ipv6_loopback_ip::it_should_use_the_loopback_ip_if_the_tracker_does_not_have_the_external_ip_configuration ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_client_ip_is_a_ipv6_loopback_ip::it_should_use_the_external_ip_in_tracker_configuration_if_it_is_defined ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_client_ip_is_a_ipv4_loopback_ip::it_should_use_the_external_ip_in_the_tracker_configuration_if_it_is_defined_even_if_the_external_ip_is_an_ipv6_ip ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_client_ip_is_a_ipv6_loopback_ip::it_should_use_the_external_ip_in_the_tracker_configuration_if_it_is_defined_even_if_the_external_ip_is_an_ipv4_ip ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_client_ip_is_a_ipv4_loopback_ip::it_should_use_the_external_tracker_ip_in_tracker_configuration_if_it_is_defined ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_client_ip_is_a_ipv4_loopback_ip::it_should_use_the_loopback_ip_if_the_tracker_does_not_have_the_external_ip_configuration ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_ipv4_loopback_ip_when_the_external_ip_is_the_unspecified_ipv4_address ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_ipv6_loopback_ip_when_the_external_ip_is_the_unspecified_ipv4_address ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_ipv4_loopback_ip_when_the_external_ip_is_the_unspecified_ipv6_address ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_ipv6_loopback_ip_when_the_external_ip_is_the_unspecified_ipv6_address ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_non_loopback_ip_when_the_external_ip_is_unspecified_ipv4 ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::and_when_the_external_ip_is_unspecified::it_should_keep_the_non_loopback_ip_when_the_external_ip_is_unspecified_ipv6 ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_allow_limiting_the_peer_list ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_cap_only_peers_wanted_at_limit_time ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::should_assign_the_ip_to_the_peer::using_the_source_ip_instead_of_the_ip_in_the_announce_request ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_convert_the_peers_wanted_number_from_i32_via_from_client_request ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_return_74_at_the_most_if_the_client_wants_them_all ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_return_the_maximin_number_of_peers_by_default ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_return_the_maximum_when_wanting_more_than_the_maximum ... ok +test announce_handler::tests::the_announce_handler::should_allow_the_client_peers_to_specified_the_number_of_peers_wanted::it_should_return_zero_when_wanting_only_zero ... ok +test authentication::key::peer_key::tests::key::length_should_be_32 ... ok +test authentication::key::peer_key::tests::key::should_only_include_alphanumeric_chars ... ok +test authentication::key::peer_key::tests::key::should_be_parsed_from_an_string ... ok +test authentication::key::peer_key::tests::key::should_return_a_reference_to_the_inner_string ... ok +test authentication::key::peer_key::tests::key::should_be_generated_randomly ... ok +test authentication::key::peer_key::tests::peer_key::could_be_permanent ... ok +test authentication::key::peer_key::tests::peer_key::could_have_an_expiration_time ... ok +test authentication::key::peer_key::tests::peer_key::expiring::should_be_displayed_when_it_is_expiring ... ok +test authentication::key::peer_key::tests::peer_key::permanent::should_be_displayed_when_it_is_permanent ... ok +test authentication::key::tests::the_expiring_peer_key::expiration_verification_should_fail_when_the_key_has_expired ... ok +test authentication::key::tests::the_expiring_peer_key::should_be_displayed ... ok +test authentication::key::tests::the_expiring_peer_key::should_be_generated_with_a_expiration_time ... ok +test authentication::key::tests::the_key_verification_error::could_be_a_database_error ... ok +test authentication::key::tests::the_permanent_peer_key::expiration_verification_should_always_succeed ... ok +test authentication::key::tests::the_permanent_peer_key::should_be_displayed ... ok +test authentication::key::tests::the_permanent_peer_key::should_be_generated_without_expiration_time ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::randomly_generated::it_should_fail_adding_a_randomly_generated_key_when_there_is_a_database_error ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::pre_generated::it_should_fail_adding_a_pre_generated_key_when_there_is_a_database_error ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_not_authenticate_a_registered_but_expired_key_by_default ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_authenticate_a_registered_key ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_unregistered_key_with_a_message_that_holds_no_source_path ... FAILED +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_expired_key_with_a_message_that_holds_no_source_path ... FAILED +test authentication::service::tests::the_authentication_service::when_the_tracker_is_public::it_should_always_authenticate_when_the_tracker_is_public ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_not_authenticate_an_unregistered_key ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_not_authenticate_a_registered_but_expired_key_when_the_tracker_is_explicitly_configured_to_check_keys_expiration ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::remove_a_new_peer_key ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::reset_the_peer_keys_with_a_new_list_of_keys ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::clear_all_peer_keys ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::insert_a_new_peer_key ... ok +test authentication::service::tests::the_authentication_service::when_the_tracker_is_private::but_the_key_expiration_check_is_disabled_by_configuration::it_should_authenticate_an_expired_registered_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::pre_generated_keys::it_should_fail_adding_a_pre_generated_key_when_there_is_a_database_error ... ok +test authentication::key::repository::in_memory::tests::the_in_memory_key_repository_should::get_a_new_peer_key_by_its_internal_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::randomly_generated::it_should_fail_adding_a_randomly_generated_key_when_there_is_a_database_error ... ok +test container::tests::it_should_return_a_typed_error_when_persistent_statistics_lack_persistence ... ok +test container::tests::it_should_construct_a_tracker_core_container_without_persistence ... ok +test databases::driver::sqlite::schema_migrator::tests::bootstrap_legacy_schema_should_be_a_noop_on_a_fresh_database ... ok +test databases::driver::sqlite::schema_migrator::tests::bootstrap_legacy_schema_should_reject_partial_legacy_state ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_allow_peers_to_get_only_a_subset_of_the_peers_in_the_swarm ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::pre_generated_keys::it_should_fail_adding_a_pre_generated_key_when_the_key_is_invalid ... ok +test databases::error::tests::it_should_build_a_database_error_from_a_sqlx_io_error ... ok +test databases::error::tests::it_should_build_a_database_error_from_a_sqlx_row_not_found_error ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_update_the_swarm_stats_for_the_torrent::when_the_peer_is_a_leecher ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_return_the_announce_data_with_an_empty_peer_list_when_it_is_the_first_announced_peer ... ok +test error::tests::peer_key_error::duration_overflow ... ok +test error::tests::peer_key_error::parsing_from_string ... ok +test error::tests::peer_key_error::persisting_into_database ... ok +test error::tests::whitelist_error::torrent_not_whitelisted ... ok +test peer_tests::it_should_be_serializable ... ok +test scrape_handler::tests::it_should_allow_scraping_for_multiple_torrents ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::pre_generated::it_should_fail_adding_a_pre_generated_key_when_the_key_duration_exceeds_the_maximum_duration ... ok +test scrape_handler::tests::it_should_fail_when_loading_the_persisted_downloads_fails ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_key_is_invalid ... FAILED +test scrape_handler::tests::it_should_report_an_in_memory_swarm_without_reading_the_persisted_downloads ... ok +test scrape_handler::tests::it_should_load_the_persisted_downloads_of_all_torrents_absent_from_memory_in_one_query ... ok +test scrape_handler::tests::it_should_look_up_a_repeated_info_hash_absent_from_memory_only_once ... ok +test scrape_handler::tests::it_should_report_every_requested_torrent_without_a_limit_on_the_number_of_info_hashes ... ok +test statistics::event::handler::tests::it_should_increment_in_memory_completion_metrics_when_a_peer_download_is_completed ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_update_the_swarm_stats_for_the_torrent::when_a_previously_announced_started_peer_has_completed_downloading ... ok +test scrape_handler::tests::it_should_return_a_zeroed_swarm_metadata_for_the_requested_file_if_the_tracker_does_not_have_that_torrent ... ok +test statistics::event::handler::tests::it_should_persist_global_completion_statistics_when_torrent_persistence_fails ... ok +test statistics::event::listener::tests::it_should_continue_after_lag_then_handle_an_event_then_stop_when_the_in_memory_receiver_is_closed ... ok +test statistics::event::handler::tests::it_should_not_increment_in_memory_completion_metrics_when_an_event_is_not_a_completion ... ok +test statistics::event::listener::tests::it_should_handle_a_queued_event_then_return_cancelled_when_cancellation_is_already_pending ... ok +test statistics::event::listener::tests::it_should_handle_an_event_then_stop_when_the_in_memory_receiver_is_closed ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_update_the_swarm_stats_for_the_torrent::when_the_peer_is_a_seeder ... ok +test statistics::event::listener::tests::it_should_leave_the_queued_event_unprocessed_and_return_cancelled_when_the_drain_timeout_has_expired ... ok +test announce_handler::tests::the_announce_handler::for_all_tracker_config_modes::handling_an_announce_request::it_should_return_the_announce_data_with_the_previously_announced_peers ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::it_should_generate_the_key ... ok +test statistics::event::listener::tests::it_should_stop_when_the_in_memory_receiver_is_closed ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::randomly_generated::it_should_generate_the_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::pre_generated_keys::it_should_add_a_pre_generated_key ... ok +test authentication::key::repository::persisted::tests::the_persisted_key_repository_should::load_all_persisted_peer_keys ... ok +test authentication::key::repository::persisted::tests::the_persisted_key_repository_should::remove_a_persisted_peer_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::pre_generated::it_should_fail_adding_a_pre_generated_key_when_the_key_is_invalid ... ok +test statistics::repository::tests::it_should_export_persisted_metric_with_zero_value_when_persisted_completed_statistics_are_enabled ... ok +test statistics::repository::tests::it_should_omit_persisted_metric_when_persisted_completed_statistics_are_disabled ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::pre_generated::it_should_add_a_pre_generated_key ... ok +test authentication::tests::the_tracker_configured_as_private::with_expiring_and::randomly_generated_keys::it_should_authenticate_a_peer_with_the_key ... ok +test authentication::tests::the_tracker_configured_as_private::with_permanent_and::pre_generated_keys::it_should_authenticate_a_peer_with_the_key ... ok +test authentication::tests::the_tracker_configured_as_private::it_should_remove_an_authentication_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_database_rejects_a_duplicate_key ... FAILED +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_expiring_peer_keys::randomly_generated::it_should_add_a_randomly_generated_key ... ok +test torrent::services::tests::getting_a_torrent_info::it_should_return_none_if_the_tracker_does_not_have_the_torrent ... ok +test authentication::tests::the_tracker_configured_as_private::with_expiring_and::randomly_generated_keys::it_should_accept_an_expired_key_when_checking_expiration_is_disabled_in_configuration ... ok +test torrent::services::tests::getting_a_torrent_info::it_should_return_the_torrent_info_if_the_tracker_has_the_torrent ... ok +test torrent::services::tests::getting_basic_torrent_info_for_multiple_torrents_at_once::it_should_return_a_list_with_basic_info_about_the_requested_torrents ... ok +test torrent::services::tests::getting_basic_torrent_info_for_multiple_torrents_at_once::it_should_return_an_empty_list_if_none_of_the_requested_torrents_is_found ... ok +test torrent::services::tests::searching_for_torrents::it_should_allow_limiting_the_number_of_torrents_in_the_result ... ok +test torrent::services::tests::searching_for_torrents::it_should_allow_using_pagination_in_the_result ... ok +test torrent::services::tests::searching_for_torrents::it_should_return_a_summarized_info_for_all_torrents ... ok +test torrent::services::tests::searching_for_torrents::it_should_return_an_empty_result_if_the_tracker_does_not_have_any_torrent ... ok +test torrent::services::tests::searching_for_torrents::it_should_return_torrents_ordered_by_info_hash ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_configured_as_listed::should_authorize_a_whitelisted_infohash ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_configured_as_listed::should_not_authorize_a_non_whitelisted_infohash ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_not_configured_as_listed::should_also_authorize_a_non_whitelisted_infohash ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_not_configured_as_listed::should_authorize_a_whitelisted_infohash ... ok +test authentication::tests::the_tracker_configured_as_private::with_expiring_and::pre_generated_keys::it_should_authenticate_a_peer_with_the_key ... ok +test authentication::tests::the_tracker_configured_as_private::it_should_load_authentication_keys_from_the_database ... ok +test whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_configured_as_listed::should_reject_a_non_whitelisted_infohash_with_a_message_that_names_it_and_holds_no_source_path ... FAILED +test whitelist::repository::in_memory::tests::should_allow_adding_a_new_torrent_to_the_whitelist ... ok +test whitelist::repository::in_memory::tests::should_allow_checking_if_an_infohash_is_whitelisted ... ok +test whitelist::repository::in_memory::tests::should_allow_clearing_the_whitelist ... ok +test whitelist::repository::in_memory::tests::should_allow_removing_a_new_torrent_to_the_whitelist ... ok +test authentication::tests::the_tracker_configured_as_private::with_expiring_and::pre_generated_keys::it_should_accept_an_expired_key_when_checking_expiration_is_disabled_in_configuration ... ok +test authentication::tests::the_tracker_configured_as_private::with_permanent_and::randomly_generated_keys::it_should_authenticate_a_peer_with_the_key ... ok +test authentication::key::repository::persisted::tests::the_persisted_key_repository_should::persist_a_new_peer_key ... ok +test authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::handling_permanent_peer_keys::randomly_generated::it_should_add_a_randomly_generated_key ... ok +test container::tests::it_should_construct_a_tracker_core_container_with_supplied_persistence ... ok +test container::tests::it_should_load_persistent_completed_statistics_when_a_torrent_is_first_announced ... ok +test databases::setup::tests::it_should_initialize_the_sqlite_database ... ok +test databases::driver::sqlite::schema_migrator::tests::bootstrap_legacy_schema_should_seed_history_when_all_legacy_tables_exist ... ok +test statistics::event::handler::tests::it_should_not_persist_completion_statistics_when_an_event_is_not_a_completion ... ok +test torrent::manager::tests::cleaning_torrents::it_should_retain_peerless_torrents_when_it_is_configured_to_do_so ... ok +test tests::the_tracker::for_all_config_modes::handling_a_scrape_request::it_should_return_the_swarm_metadata_for_the_requested_file_if_the_tracker_has_that_torrent ... ok +test statistics::event::listener::tests::it_should_handle_an_event_then_stop_when_the_persistent_receiver_is_closed ... ok +test torrent::manager::tests::cleaning_torrents::it_should_remove_peers_that_have_not_been_updated_after_a_cutoff_time ... ok +test tests::the_tracker::configured_as_whitelisted::handling_a_scrape_request::it_should_return_the_zeroed_swarm_metadata_for_the_requested_file_if_it_is_not_whitelisted ... ok +test statistics::event::listener::tests::it_should_stop_when_the_persistent_receiver_is_closed ... ok +test torrent::manager::tests::cleaning_torrents::it_should_remove_torrents_that_have_no_peers_when_it_is_configured_to_do_so ... ok +test statistics::event::listener::tests::it_should_leave_the_queued_events_unprocessed_and_return_cancelled_when_the_drain_timeout_has_expired ... ok +test databases::driver::sqlite::tests::create_database_tables_should_be_idempotent_on_a_fresh_database ... ok +test statistics::event::listener::tests::it_should_continue_after_lag_then_handle_an_event_then_stop_when_the_persistent_receiver_is_closed ... ok +test statistics::persisted::downloads::tests::it_increases_the_numbers_of_downloads_for_a_torrent_into_the_database ... ok +test statistics::persisted::downloads::tests::it_loads_the_numbers_of_downloads_for_all_torrents_from_the_database ... ok +test statistics::event::listener::tests::it_should_persist_a_queued_completed_download_when_cancellation_is_already_pending ... ok +test statistics::persisted::downloads::tests::it_saves_the_numbers_of_downloads_for_a_torrent_into_the_database ... ok +test statistics::event::handler::tests::it_should_persist_completion_statistics_when_a_peer_download_is_completed ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_load_all_infohashes_from_the_database ... ok +test statistics::event::listener::tests::it_should_persist_every_queued_event_then_return_cancelled_when_cancellation_is_already_pending ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_not_fail_removing_an_infohash_that_is_not_in_the_list ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_not_add_the_same_infohash_to_the_list_twice ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_add_a_new_infohash_to_the_list ... ok +test torrent::manager::tests::it_should_load_the_numbers_of_downloads_for_all_torrents_from_the_database ... ok +test whitelist::repository::persisted::tests::the_persisted_whitelist_repository::should_remove_a_infohash_from_the_list ... ok +test whitelist::tests::configured_as_whitelisted::handling_authorization::it_should_not_authorize_the_announce_and_scrape_actions_on_not_whitelisted_torrents ... ok +test whitelist::manager::tests::configured_as_whitelisted::handling_the_torrent_whitelist::persistence::it_should_load_the_whitelist_from_the_database ... ok +test whitelist::manager::tests::configured_as_whitelisted::handling_the_torrent_whitelist::it_should_add_a_torrent_to_the_whitelist ... ok +test whitelist::tests::configured_as_whitelisted::handling_authorization::it_should_authorize_the_announce_and_scrape_actions_on_whitelisted_torrents ... ok +test whitelist::manager::tests::configured_as_whitelisted::handling_the_torrent_whitelist::it_should_remove_a_torrent_from_the_whitelist ... ok +test databases::driver::sqlite::tests::run_sqlite_driver_tests ... FAILED + +failures: + +---- authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_unregistered_key_with_a_message_that_holds_no_source_path stdout ---- + +thread 'authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_unregistered_key_with_a_message_that_holds_no_source_path' panicked at packages/tracker-core/src/authentication/service.rs:221:17: +assertion `left == right` failed + left: "Failed to read key: YZSl4lMZupRuOpSRC3krIKR5BPB14nrJ, packages/tracker-core/src/authentication/service.rs:98:27" + right: "Failed to read key: YZSl4lMZupRuOpSRC3krIKR5BPB14nrJ" + +---- authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_expired_key_with_a_message_that_holds_no_source_path stdout ---- + +thread 'authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_expired_key_with_a_message_that_holds_no_source_path' panicked at packages/tracker-core/src/authentication/service.rs:244:17: +assertion `left == right` failed + left: "Key has expired, packages/tracker-core/src/authentication/key/mod.rs:158:31" + right: "Key has expired" +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + +---- authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_key_is_invalid stdout ---- + +thread 'authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_key_is_invalid' panicked at packages/tracker-core/src/authentication/handler.rs:748:17: +the error message must not hold a source path, but it contains ".rs:": "Invalid key length. Key must be have 32 chars, packages/tracker-core/src/authentication/handler.rs:125:46" + +---- authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_database_rejects_a_duplicate_key stdout ---- + +thread 'authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_database_rejects_a_duplicate_key' panicked at packages/tracker-core/src/authentication/handler.rs:735:17: +the error message must not hold a source path, but it contains ".rs:": "Can't persist key: The Sqlite3 query was malformed: error returned from database: (code: 2067) UNIQUE constraint failed: keys.key, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:74:22, packages/tracker-core/src/authentication/handler.rs:120:50" + +---- whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_configured_as_listed::should_reject_a_non_whitelisted_infohash_with_a_message_that_names_it_and_holds_no_source_path stdout ---- + +thread 'whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_configured_as_listed::should_reject_a_non_whitelisted_infohash_with_a_message_that_names_it_and_holds_no_source_path' panicked at packages/tracker-core/src/whitelist/authorization.rs:148:17: +assertion `left == right` failed + left: "The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted, packages/tracker-core/src/whitelist/authorization.rs:61:23" + right: "The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted" + +---- databases::driver::sqlite::tests::run_sqlite_driver_tests stdout ---- + +thread 'databases::driver::sqlite::tests::run_sqlite_driver_tests' panicked at packages/tracker-core/src/databases/driver/mod.rs:280:13: +the error message must not hold a source path, but it contains ".rs:": "The Sqlite3 query was malformed: error returned from database: (code: 2067) UNIQUE constraint failed: keys.key, packages/tracker-core/src/databases/driver/sqlite/auth_key_store.rs:74:22" + + +failures: + authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_database_rejects_a_duplicate_key + authentication::handler::tests::the_keys_handler_when_the_tracker_is_configured_as_private::peer_key_errors::it_should_fail_without_a_source_path_when_the_key_is_invalid + authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_expired_key_with_a_message_that_holds_no_source_path + authentication::service::tests::the_authentication_service::when_the_tracker_is_private::it_should_reject_an_unregistered_key_with_a_message_that_holds_no_source_path + databases::driver::sqlite::tests::run_sqlite_driver_tests + whitelist::authorization::tests::the_whitelist_authorization_for_announce_and_scrape_actions::when_the_tacker_is_configured_as_listed::should_reject_a_non_whitelisted_infohash_with_a_message_that_names_it_and_holds_no_source_path + +test result: FAILED. 154 passed; 6 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.13s + +error: test failed, to rerun pass `-p torrust-tracker-core --lib` diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-udp-server-integration.txt b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-udp-server-integration.txt new file mode 100644 index 0000000000..37364bb354 --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-udp-server-integration.txt @@ -0,0 +1,62 @@ + Finished `test` profile [optimized + debuginfo] target(s) in 0.17s + Running tests/integration.rs (target/debug/build/torrust-tracker-udp-server/39c10e4ee6f5be3c/out/integration-39c10e4ee6f5be3c) + +running 17 tests +2026-11-21T13:32:58.505404Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:35900 +2026-11-21T13:32:58.506311Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:46229 +2026-11-21T13:32:58.506976Z ERROR torrust_tracker_core::whitelist::authorization: error=The torrent: af0935008ed1f224d482116262d1d52eb8bfb999, is not whitelisted, packages/tracker-core/src/whitelist/authorization.rs:61:23 +2026-11-21T13:32:58.506988Z ERROR UDP TRACKER: response error error=tracker announce error: Tracker core whitelist error: The torrent: af0935008ed1f224d482116262d1d52eb8bfb999, is not whitelisted, packages/tracker-core/src/whitelist/authorization.rs:61:23 client_socket_addr=127.0.0.1:52438 server_socket_addr=127.0.0.1:40703 service_binding=udp://127.0.0.1:40703 request_id=e26363aa-f162-4994-9afb-59470afc11c2 transaction_id=123 +2026-11-21T13:32:58.507044Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is from future: 1627530203481512300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected < 1795267979.5070276 client_socket_addr=127.0.0.1:52323 server_socket_addr=127.0.0.1:36331 service_binding=udp://127.0.0.1:36331 request_id=2b5f2888-0b0f-4b20-b0c9-b335e4d4592f transaction_id=0 +2026-11-21T13:32:58.507993Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:38110 +2026-11-21T13:32:58.509081Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:55708 +2026-11-21T13:32:58.510393Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:41327 +2026-11-21T13:32:58.513739Z ERROR UDP TRACKER: response error error=error parsing request: SendableRequestParseError { message: "Protocol identifier missing", opt_connection_id: None, opt_transaction_id: None } client_socket_addr=127.0.0.1:46419 server_socket_addr=127.0.0.1:57333 service_binding=udp://127.0.0.1:57333 request_id=1644da82-7981-4d5a-bab0-0621fb140cfc +2026-11-21T13:32:58.513751Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000001626869489059323, expected > 1795267857.513744 client_socket_addr=127.0.0.1:58652 server_socket_addr=127.0.0.1:43790 service_binding=udp://127.0.0.1:43790 request_id=67ddee8e-0a86-4626-b4fe-636a3e85582b transaction_id=0 +2026-11-21T13:32:58.515632Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5156248 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=b3b017da-8a76-4371-8c88-5921ec2cebd4 transaction_id=1182011394 +2026-11-21T13:32:58.516833Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is from future: 1627530203481512300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected < 1795267979.5168245 client_socket_addr=127.0.0.1:52323 server_socket_addr=127.0.0.1:36331 service_binding=udp://127.0.0.1:36331 request_id=cbf32523-c862-4d3e-969b-c0bd70388066 transaction_id=1 +test server::contract::receiving_an_scrape_request::should_return_a_scrape_response ... ok +test server::contract::receiving_a_connection_request::should_return_a_connect_response ... ok +test server::contract::receiving_an_announce_request::should_reject_a_torrent_that_is_not_whitelisted_with_a_message_that_holds_no_source_path ... FAILED +2026-11-21T13:32:58.520537Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000001626869489059323, expected > 1795267857.520531 client_socket_addr=127.0.0.1:58652 server_socket_addr=127.0.0.1:43790 service_binding=udp://127.0.0.1:43790 request_id=e1f8fbda-1317-453f-a808-8ff921e907f9 transaction_id=1 +2026-11-21T13:32:58.525676Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: 0.000000000000000000000000000000000000000000000000000000000000000000000000000001626869489059323, expected > 1795267857.5256708 client_socket_addr=127.0.0.1:58652 server_socket_addr=127.0.0.1:43790 service_binding=udp://127.0.0.1:43790 request_id=9a4c0277-bbd0-400e-aa01-3ba83661a067 transaction_id=2 +2026-11-21T13:32:58.529924Z WARN UDP TRACKER: UDP connection ID validation is DISABLED for this listener. Anti-spoofing and replay protection are reduced. Ensure this listener is isolated through external network controls. bind_to=127.0.0.1:35501 +2026-11-21T13:32:58.530116Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5301106 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=bf637770-98e2-439d-89aa-092dbeef2a03 transaction_id=937891778 +2026-11-21T13:32:58.530206Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5302038 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=c0d7ff75-6e6a-46b5-b846-991c14967c34 transaction_id=-586502872 +2026-11-21T13:32:58.530260Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5302591 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=7ff8ddeb-91a6-4353-b962-e5ae06356a6e transaction_id=-2058342829 +2026-11-21T13:32:58.530310Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5303087 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=b983f145-4237-454e-a051-651d415969f3 transaction_id=1248991869 +2026-11-21T13:32:58.530355Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5303538 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=3e3861b6-3466-422e-a26c-3d4b9109b870 transaction_id=-1869336161 +2026-11-21T13:32:58.530399Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5303977 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=7078f17d-2de5-4ca2-8b63-fe7a32ef8697 transaction_id=890167046 +2026-11-21T13:32:58.530443Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5304418 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=9040d88c-8cd8-46b2-ba35-6995e00f76f2 transaction_id=-1191909471 +2026-11-21T13:32:58.530487Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5304863 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=48a2bc2b-e7e3-4daf-854b-aaf3b0081639 transaction_id=-1983331901 +2026-11-21T13:32:58.530535Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5305336 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=4dcc015d-590b-46bb-8a06-05831c0279eb transaction_id=27484249 +2026-11-21T13:32:58.530583Z WARN UDP TRACKER: response error error=tracker announce error: Connection cookie error: cookie value is expired: -137241603156102090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, expected > 1795267857.5305822 client_socket_addr=127.0.0.1:44807 server_socket_addr=127.0.0.1:52052 service_binding=udp://127.0.0.1:52052 request_id=3fc62010-3919-4f37-8434-5d81c4a824c8 transaction_id=-1639937652 +test server::contract::should_return_a_bad_request_response_when_the_client_sends_an_empty_request ... ok +test server::contract::receiving_an_announce_request::should_return_an_announce_response ... ok +test server::contract::using_disabled_connection_id_validation::announce_succeeds_with_an_arbitrary_connection_id ... ok +test server::contract::publishing_the_banned_ips_total::with_disabled_connection_id_validation::should_not_publish_a_client_as_banned_before_it_exceeds_the_connection_id_error_limit ... ok +test server::contract::publishing_the_banned_ips_total::with_strict_connection_id_validation::should_not_publish_a_client_as_banned_before_it_exceeds_the_connection_id_error_limit ... ok +test server::contract::using_disabled_connection_id_validation::scrape_succeeds_with_an_arbitrary_connection_id ... ok +test server::contract::publishing_the_banned_ips_total::with_disabled_connection_id_validation::should_publish_a_client_that_exceeds_the_connection_id_error_limit_as_would_be_banned ... ok +test server::contract::publishing_the_banned_ips_total::with_strict_connection_id_validation::should_publish_a_client_as_banned_once_it_exceeds_the_connection_id_error_limit ... ok +test server::contract::using_disabled_connection_id_validation::many_invalid_connection_ids_do_not_cause_ban_in_disabled_mode ... ok +test server::contract::receiving_an_announce_request::should_return_many_announce_response ... ok +test server::contract::using_disabled_connection_id_validation::connect_still_issues_a_valid_connection_id ... ok +test server::contract::using_ipv6_v6only::should_accept_ipv6_connections_with_ipv6_v6only_enabled ... ok +test server::contract::receiving_an_scrape_request::should_return_only_the_first_74_torrent_stats_when_the_request_has_75_info_hashes ... ok +test server::contract::receiving_an_announce_request::should_ban_the_client_ip_if_it_sends_more_than_10_requests_with_a_cookie_value_not_normal ... ok + +failures: + +---- server::contract::receiving_an_announce_request::should_reject_a_torrent_that_is_not_whitelisted_with_a_message_that_holds_no_source_path stdout ---- + +thread 'server::contract::receiving_an_announce_request::should_reject_a_torrent_that_is_not_whitelisted_with_a_message_that_holds_no_source_path' panicked at packages/udp-server/tests/server/contract.rs:240:9: +the error message must not hold a source path, but it contains ".rs:": "tracker announce error: Tracker core whitelist error: The torrent: af0935008ed1f224d482116262d1d52eb8bfb999, is not whitelisted, packages/tracker-core/src/whitelist/authorization.rs:61:23" +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + + +failures: + server::contract::receiving_an_announce_request::should_reject_a_torrent_that_is_not_whitelisted_with_a_message_that_holds_no_source_path + +test result: FAILED. 16 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.09s + +error: test failed, to rerun pass `-p torrust-tracker-udp-server --test integration` diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-udp-server-lib.txt b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-udp-server-lib.txt new file mode 100644 index 0000000000..f79f96a062 --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/evidence/tests-red-udp-server-lib.txt @@ -0,0 +1,340 @@ + Compiling tokio v1.54.1 + Compiling digest v0.10.7 + Compiling smallvec v1.16.6 + Compiling torrust-peer-id v0.1.0 + Compiling openssl v0.10.82 + Compiling rustls v0.23.46 + Compiling torrust-metrics v0.2.0 + Compiling sha2 v0.10.9 + Compiling hmac v0.12.1 + Compiling signature v2.2.0 + Compiling md-5 v0.10.6 + Compiling sha1 v0.10.7 + Compiling icu_normalizer v2.4.0 + Compiling parking_lot_core v0.9.12 + Compiling num-bigint-dig v0.8.6 + Compiling tracing-subscriber v0.3.23 + Compiling torrust-tracker-udp-protocol v0.1.0 (/packages/udp-protocol) + Compiling torrust-tracker-http-protocol v0.1.0 (/packages/http-protocol) + Compiling hkdf v0.12.4 + Compiling parking_lot v0.12.5 + Compiling futures-intrusive v0.5.0 + Compiling figment v0.10.19 + Compiling idna_adapter v1.2.2 + Compiling idna v1.1.0 + Compiling url v2.5.8 + Compiling rsa v0.9.10 + Compiling torrust-net-primitives v0.1.0 + Compiling torrust-tracker-primitives v3.1.0 (/packages/primitives) + Compiling torrust-tracker-configuration v3.0.0 (/packages/configuration) + Compiling native-tls v0.2.18 + Compiling rustls-platform-verifier v0.7.1 + Compiling torrust-tracker-test-helpers v3.0.0 (/packages/test-helpers) + Compiling tokio-util v0.7.20 + Compiling tokio-stream v0.1.19 + Compiling torrust-tracker-events v0.1.0 (/packages/events) + Compiling tokio-rustls v0.26.6 + Compiling tower v0.5.3 + Compiling async-compression v0.4.52 + Compiling criterion v0.5.1 + Compiling sqlx-core v0.8.6 + Compiling tower-http v0.6.11 + Compiling h2 v0.4.20 + Compiling torrust-tracker-swarm-coordination-registry v0.1.0 (/packages/swarm-coordination-registry) + Compiling tower-http v0.7.1 + Compiling torrust-server-lib v0.6.0 + Compiling sqlx-mysql v0.8.6 + Compiling sqlx-postgres v0.8.6 + Compiling sqlx-sqlite v0.8.6 + Compiling hyper v1.12.0 + Compiling hyper-util v0.1.21 + Compiling sqlx v0.8.6 + Compiling torrust-tracker-core v0.1.0 (/packages/tracker-core) + Compiling hyper-rustls v0.27.10 + Compiling reqwest v0.13.5 + Compiling torrust-tracker-client-lib v0.1.0 (/packages/tracker-client) + Compiling torrust-tracker-udp-core v0.1.0 (/packages/udp-core) + Compiling torrust-tracker-udp-server v0.1.0 (/packages/udp-server) + Finished `test` profile [optimized + debuginfo] target(s) in 15.85s + Running unittests src/lib.rs (target/debug/build/torrust-tracker-udp-server/4684096654e40990/out/torrust_tracker_udp_server-4684096654e40990) + +running 224 tests +test banning::event::listener::tests::it_should_ignore_non_connection_cookie_errors ... ok +test banning::event::listener::tests::it_should_leave_the_queued_event_unprocessed_and_return_cancelled_when_the_drain_timeout_has_expired ... ok +test banning::event::handler::tests::it_should_publish_the_banned_ip_total_after_a_connection_cookie_error ... ok +test banning::event::handler::tests::it_should_record_the_connection_cookie_error_for_its_client_ip ... ok +test banning::event::handler::tests::it_should_not_hold_the_ban_service_lock_while_waiting_to_publish_the_banned_ip_total ... ok +test banning::event::listener::tests::it_should_handle_a_queued_event_then_return_cancelled_when_cancellation_is_already_pending ... ok +test banning::event::handler::tests::it_should_hold_the_publication_order_until_it_has_published_the_banned_ip_total ... ok +test banning::event::listener::tests::it_should_process_connection_cookie_errors_after_lagging ... ok +test banning::tests::it_should_not_hold_the_ban_service_lock_while_waiting_to_publish_the_reset_total ... ok +test banning::event::listener::tests::it_should_stop_when_the_receiver_is_closed ... ok +test error::tests::it_should_preserve_response_routing_identifiers_for_a_sendable_parse_error ... ok +test error::tests::it_should_clear_response_routing_identifiers_for_an_unsendable_parse_error ... ok +test banning::tests::it_should_publish_the_new_banned_ips_total_after_resetting_the_bans ... ok +test error::tests::it_should_wrap_a_sendable_parse_error_as_an_invalid_request ... ok +test error::tests::it_should_wrap_a_scrape_service_error_as_a_scrape_failure ... ok +test banning::tests::it_should_hold_the_publication_order_until_it_has_published_the_reset_total ... ok +test error::tests::it_should_wrap_an_announce_service_error_as_an_announce_failure ... ok +test event::tests::it_should_classify_a_connection_cookie_error ... ok +test event::tests::it_should_classify_a_database_error ... ok +test event::tests::it_should_classify_a_negative_number_of_bytes_in_an_announce_as_a_bad_request ... ok +test event::tests::it_should_classify_a_nested_scrape_whitelist_error ... FAILED +test event::tests::it_should_classify_a_direct_scrape_whitelist_error ... FAILED +test event::tests::it_should_classify_a_nested_announce_whitelist_error ... FAILED +test event::tests::it_should_classify_a_scrape_connection_cookie_error ... ok +test event::tests::it_should_classify_a_scrape_database_error ... ok +test event::tests::it_should_classify_a_whitelist_error ... FAILED +test event::tests::it_should_classify_an_authentication_error ... ok +test event::tests::it_should_classify_an_internal_error ... ok +test event::tests::it_should_classify_an_invalid_request_as_a_request_parse_error ... ok +test event::tests::it_should_convert_request_kinds_to_metric_labels ... ok +test event::tests::it_should_render_request_kinds ... ok +test handlers::announce::tests::announce_request::it_should_convey_the_largest_interval_and_clamp_out_of_range_peer_counts_for_both_address_families ... ok +test handlers::connect::tests::connect_request::it_should_send_the_udp6_connect_event_when_a_client_tries_to_connect_using_an_ipv6_socket_address ... ok +test handlers::error::tests::it_should_not_classify_an_internal_failure_as_a_connection_cookie_error ... ok +test handlers::error::tests::it_should_classify_announce_and_scrape_cookie_failures_as_connection_cookie_errors ... ok +test handlers::scrape::tests::scrape_request::it_should_return_zeroed_statistics_when_scrape_data_does_not_contain_a_requested_hash ... ok +test container::tests::it_should_publish_events_through_the_enabled_server_event_bus ... ok +test handlers::error::tests::it_should_answer_with_the_error_message_and_the_request_transaction_id ... ok +test handlers::connect::tests::connect_request::it_should_send_the_udp4_connect_event_when_a_client_tries_to_connect_using_an_ipv4_socket_address ... ok +test handlers::announce::tests::announce_request::using_ipv6::from_a_loopback_ip::the_peer_ip_should_be_changed_to_the_external_ip_in_the_tracker_configuration ... ok +test handlers::tests::it_should_build_a_cookie_validation_range_around_the_issue_time ... ok +test handlers::error::tests::it_should_publish_an_error_event_naming_the_connection_request_kind_and_error ... ok +test handlers::tests::wire_i32_conversion::it_should_clamp_instead_of_wrapping_a_value_beyond_the_signed_wire_field ... ok +test handlers::tests::wire_i32_conversion::it_should_keep_a_value_that_fits_in_the_signed_wire_field ... ok +test handlers::tests::wire_i32_conversion::it_should_keep_the_largest_value_that_fits_in_the_signed_wire_field ... ok +test handlers::connect::tests::connect_request::a_connect_response_should_contain_the_same_transaction_id_as_the_connect_request ... ok +test server::bound_socket::tests::it_should_report_consistent_udp_endpoint_metadata ... ok +test handlers::error::tests::it_should_answer_with_a_zero_transaction_id_when_the_request_has_no_transaction_id ... ok +test server::bound_socket::tests::it_should_bind_to_a_non_zero_port_when_port_zero_is_requested ... ok +test server::bound_socket::tests::it_should_restrict_an_ipv6_socket_to_ipv6_when_ipv6_v6only_is_requested ... ok +test server::bound_socket::tests::it_should_return_an_error_when_the_address_is_already_in_use ... ok +test handlers::connect::tests::connect_request::a_connect_response_should_contain_a_new_connection_id_ipv6 ... ok +test handlers::announce::tests::announce_request::using_ipv6::should_send_the_udp6_announce_event ... ok +test server::launcher::tests::it_should_admit_a_request_from_a_client_that_is_not_banned ... ok +test handlers::announce::tests::announce_request::using_ipv4::should_send_the_udp4_announce_event ... ok +test handlers::announce::tests::announce_request::using_ipv4::an_announced_peer_should_be_added_to_the_tracker ... ok +test server::launcher::tests::receive_loop_admission::it_should_admit_a_received_datagram ... ok +test server::launcher::tests::it_should_discard_a_request_from_a_banned_client_in_strict_mode ... ok +test server::launcher::tests::receive_loop_admission::it_should_stop_with_the_receive_error_when_receiving_fails ... ok +test server::launcher::tests::receive_loop_admission::it_should_stop_with_an_unexpected_end_error_when_the_receive_stream_ends ... ok +test server::launcher::tests::receive_loop_admission::it_should_stop_with_the_receive_error_when_receiving_is_interrupted ... ok +test handlers::scrape::tests::scrape_request::it_should_publish_a_cookie_error_and_answer_when_cookie_validation_is_disabled ... ok +test handlers::announce::tests::announce_request::using_ipv4::the_announced_peer_should_not_be_included_in_the_response ... ok +test handlers::announce::tests::announce_request::it_should_encode_only_peer_addresses_matching_the_request_family ... ok +test server::launcher::tests::request_drain::it_should_abort_and_join_processors_still_running_at_the_deadline ... ok +test handlers::announce::tests::announce_request::using_ipv4::the_tracker_should_always_use_the_remote_client_ip_but_not_the_port_in_the_udp_request_header_instead_of_the_peer_address_in_the_announce_request ... ok +test server::launcher::tests::request_drain::it_should_count_a_processor_aborted_before_the_drain_as_evicted ... ok +test handlers::tests::it_should_preserve_the_transaction_id_for_a_sendable_parse_error_without_a_request_kind ... ok +test server::launcher::tests::it_should_admit_a_request_from_a_banned_client_when_connection_id_validation_is_disabled ... ok +2026-11-21T13:32:34.896711Z WARN UDP TRACKER: UDP request drain deadline reached: aborting remaining request processors service_binding="udp://192.0.2.15:2382" remaining=1 deadline=5s +test server::launcher::tests::request_drain::it_should_count_failed_processors_and_keep_draining_the_rest ... ok +test server::launcher::tests::request_drain::it_should_count_processors_that_finish_before_the_deadline_as_completed ... ok +test server::launcher::tests::request_drain::it_should_name_the_listener_in_the_deadline_warning ... ok +test server::launcher::tests::request_drain::it_should_join_every_processor_before_returning_the_receive_error ... ok +test server::launcher::tests::request_drain::it_should_return_immediately_when_there_are_no_processors ... ok +test handlers::scrape::tests::scrape_request::it_should_publish_an_accepted_scrape_event_for_an_ipv4_client ... ok +test server::request_buffer::tests::it_should_abort_a_pending_task_when_the_request_buffer_is_dropped ... ok +2026-11-21T13:32:34.897470Z WARN UDP TRACKER: Udp::run_udp_server::loop aborting request: (no finished tasks) local_addr="127.0.0.1:6969" +test server::request_buffer::tests::it_should_evict_the_oldest_pending_task_when_the_buffer_is_full ... ok +test server::request_buffer::tests::it_should_not_evict_a_pending_task_when_the_buffer_has_available_capacity ... ok +test handlers::tests::it_should_scrape_only_the_first_74_info_hashes_of_a_payload_with_75 ... ok +test handlers::announce::tests::announce_request::using_ipv6::an_announced_peer_should_be_added_to_the_tracker ... ok +test handlers::tests::it_should_dispatch_a_connect_request ... ok +test server::receiver::tests::it_should_yield_a_raw_request_with_the_received_datagram_and_sender_address ... ok +test handlers::announce::tests::announce_request::using_ipv6::the_announced_peer_should_not_be_included_in_the_response ... ok +test handlers::announce::tests::announce_request::using_ipv4::it_should_reject_an_announce_with_a_negative_number_of_bytes_left ... ok +test handlers::scrape::tests::scrape_request::it_should_preserve_a_scrape_service_failure_for_packet_error_routing ... ok +test server::launcher::tests::it_should_discard_a_request_whose_source_port_is_zero ... ok +2026-11-21T13:32:34.916805Z ERROR torrust_tracker_core::whitelist::authorization: error=The torrent: 0000000000000000000000000000000000000000, is not whitelisted, packages/tracker-core/src/whitelist/authorization.rs:61:23 +test handlers::announce::tests::announce_request::using_ipv6::the_tracker_should_always_use_the_remote_client_ip_but_not_the_port_in_the_udp_request_header_instead_of_the_peer_address_in_the_announce_request ... ok +test statistics::event::handler::error::tests::it_should_label_a_general_error_metric_with_connect_request_kind ... ok +test handlers::scrape::tests::scrape_request::it_should_return_zeroed_statistics_when_the_tracker_does_not_have_the_requested_torrent ... ok +test statistics::event::handler::error::tests::it_should_label_a_connection_id_error_metric_with_qbittorrent_client_software ... ok +test statistics::event::handler::request_aborted::tests::it_should_increase_the_number_of_aborted_requests_when_it_receives_a_udp_request_aborted_event ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp4_announce_requests_counter_when_it_receives_a_udp4_request_event_of_announce_kind ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp4_connect_requests_counter_when_it_receives_a_udp4_request_event_of_connect_kind ... ok +test handlers::scrape::tests::scrape_request::with_a_public_tracker::it_should_return_statistics_when_the_public_tracker_has_the_requested_torrent ... ok +test statistics::event::handler::error::tests::it_should_increase_the_udp4_errors_counter_when_it_receives_a_udp4_error_event ... ok +test handlers::announce::tests::announce_request::using_ipv4::when_the_announce_request_comes_from_a_client_using_ipv4_the_response_should_not_include_peers_using_ipv6 ... ok +test handlers::announce::tests::announce_request::using_ipv6::when_the_announce_request_comes_from_a_client_using_ipv6_the_response_should_not_include_peers_using_ipv4 ... ok +test handlers::scrape::tests::scrape_request::it_should_return_an_entry_for_each_duplicate_requested_info_hash ... ok +2026-11-21T13:32:34.920750Z WARN UDP TRACKER: Ignoring UDP server event from an unknown or metrics-disabled listener configuration_instance_id=ConfigurationInstanceId { service_role: UdpTracker, instance_index: 1 } +test handlers::announce::tests::announce_request::using_ipv4::it_should_preserve_an_announce_service_failure_for_packet_error_routing ... ok +test handlers::scrape::tests::scrape_request::with_a_whitelisted_tracker::it_should_return_zeroed_statistics_when_the_listed_tracker_has_not_whitelisted_the_torrent ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp4_scrape_requests_counter_when_it_receives_a_udp4_request_event_of_scrape_kind ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp6_announce_requests_counter_when_it_receives_a_udp6_request_event_of_announce_kind ... ok +2026-11-21T13:32:34.920892Z WARN UDP TRACKER: Udp tracker server statistics receiver lagged by 2 events. +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp6_connect_requests_counter_when_it_receives_a_udp6_request_event_of_connect_kind ... ok +test statistics::event::handler::request_accepted::tests::it_should_increase_the_udp6_scrape_requests_counter_when_it_receives_a_udp6_request_event_of_scrape_kind ... ok +test statistics::event::handler::request_banned::tests::it_should_increase_the_number_of_banned_requests_when_it_receives_a_udp_request_banned_event ... ok +test statistics::event::handler::request_discarded::tests::it_should_increase_the_number_of_discarded_requests_when_it_receives_a_udp_request_discarded_event ... ok +2026-11-21T13:32:34.920996Z WARN UDP TRACKER: Ignoring UDP server event from an unknown or metrics-disabled listener configuration_instance_id=ConfigurationInstanceId { service_role: UdpTracker, instance_index: 1 } +2026-11-21T13:32:34.921005Z WARN UDP TRACKER: Ignoring UDP server event from an unknown or metrics-disabled listener configuration_instance_id=ConfigurationInstanceId { service_role: UdpTracker, instance_index: 2 } +test statistics::event::handler::response_sent::tests::it_should_update_the_connect_processing_time_average_for_a_successful_connect_response ... ok +test statistics::event::handler::request_received::tests::it_should_increase_the_number_of_incoming_requests_when_it_receives_a_udp4_incoming_request_event ... ok +test statistics::event::handler::response_sent::tests::it_should_increase_the_udp4_responses_counter_when_it_receives_a_udp4_response_event ... ok +test statistics::event::handler::response_sent::tests::it_should_increase_the_udp6_response_counter_when_it_receives_a_udp6_response_event ... ok +2026-11-21T13:32:34.921116Z WARN UDP TRACKER: Event listener drain lost events after cancellation listener="udp_tracker_server_statistics" outcome="timed_out" processed=0 lost_to_lag=0 unread_when_timed_out=1 +test handlers::scrape::tests::scrape_request::it_should_publish_an_accepted_scrape_event_for_an_ipv6_client ... ok +test handlers::scrape::tests::scrape_request::it_should_preserve_the_order_of_eight_requested_info_hashes ... ok +test statistics::event::listener::tests::it_should_apply_the_metrics_policy_to_a_drained_event ... ok +test statistics::event::listener::tests::it_should_handle_a_queued_event_then_return_cancelled_when_cancellation_is_already_pending ... ok +test statistics::event::listener::tests::it_should_process_enabled_events_after_lagging ... ok +test statistics::event::listener::tests::it_should_stop_when_the_receiver_is_closed ... ok +test statistics::metrics::tests::averaged_processing_time_metrics::it_should_handle_fractional_averages_with_truncation ... ok +test statistics::event::listener::tests::it_should_update_metrics_only_for_an_enabled_configuration_instance ... ok +test statistics::metrics::tests::averaged_processing_time_metrics::it_should_handle_single_server_averaged_metrics ... ok +test statistics::metrics::tests::averaged_processing_time_metrics::it_should_only_average_matching_request_kinds ... ok +test statistics::metrics::tests::averaged_processing_time_metrics::it_should_return_averaged_value_for_udp_avg_announce_processing_time_ns_averaged ... ok +test handlers::announce::tests::announce_request::using_ipv4::from_a_loopback_ip::each_listener_should_use_its_own_configured_external_ip ... ok +test statistics::metrics::tests::averaged_processing_time_metrics::it_should_return_zero_for_udp_avg_announce_processing_time_ns_averaged_when_no_data ... ok +test statistics::event::listener::tests::it_should_leave_the_queued_event_unprocessed_and_return_cancelled_when_the_drain_timeout_has_expired ... ok +test statistics::metrics::tests::combined_metrics::it_should_distinguish_between_different_request_kinds ... ok +test statistics::metrics::tests::combined_metrics::it_should_handle_mixed_ipv4_and_ipv6_for_different_request_kinds ... ok +test statistics::metrics::tests::combined_metrics::it_should_distinguish_between_ipv4_and_ipv6_metrics ... ok +test statistics::metrics::tests::averaged_processing_time_metrics::it_should_return_averaged_value_for_udp_avg_connect_processing_time_ns_averaged ... ok +test statistics::metrics::tests::averaged_processing_time_metrics::it_should_return_averaged_value_for_udp_avg_scrape_processing_time_ns_averaged ... ok +test statistics::metrics::tests::edge_cases::it_should_handle_large_counter_values ... ok +test statistics::metrics::tests::averaged_processing_time_metrics::it_should_return_zero_for_udp_avg_connect_processing_time_ns_averaged_when_no_data ... ok +test statistics::metrics::tests::error_handling::it_should_return_ok_result_for_valid_counter_operations ... ok +test statistics::metrics::tests::it_should_implement_default ... ok +test statistics::metrics::tests::edge_cases::it_should_handle_large_gauge_values ... ok +test statistics::metrics::tests::edge_cases::it_should_handle_zero_gauge_values ... ok +test statistics::metrics::tests::edge_cases::it_should_handle_multiple_labels_on_same_metric ... ok +test statistics::metrics::tests::edge_cases::it_should_handle_empty_label_sets ... ok +test statistics::metrics::tests::it_should_implement_debug ... ok +test server::launcher::tests::it_should_publish_a_request_discarded_event_when_its_source_port_is_zero ... ok +test statistics::metrics::tests::edge_cases::it_should_overwrite_gauge_values_when_set_multiple_times ... ok +test statistics::metrics::tests::error_handling::it_should_handle_unknown_metric_names_gracefully ... ok +test statistics::metrics::tests::it_should_increase_counter_metric_with_labels ... ok +test statistics::metrics::tests::it_should_increment_processed_requests_total ... ok +test statistics::metrics::tests::error_handling::it_should_return_ok_result_for_valid_gauge_operations ... ok +test statistics::metrics::tests::it_should_set_gauge_metric ... ok +test statistics::metrics::tests::averaged_processing_time_metrics::it_should_return_zero_for_udp_avg_scrape_processing_time_ns_averaged_when_no_data ... ok +test handlers::scrape::tests::scrape_request::with_a_whitelisted_tracker::it_should_return_statistics_when_the_listed_tracker_has_a_whitelisted_torrent ... ok +test statistics::metrics::tests::it_should_set_gauge_metric_with_labels ... ok +test statistics::metrics::tests::it_should_implement_partial_eq ... ok +test statistics::metrics::tests::udp_general_metrics::it_should_return_gauge_value_for_udp_banned_ips_total ... ok +test statistics::metrics::tests::udp_general_metrics::it_should_return_sum_of_udp_requests_aborted ... ok +test statistics::metrics::tests::udp_general_metrics::it_should_return_sum_of_udp_requests_banned ... ok +test statistics::metrics::tests::udp_general_metrics::it_should_return_zero_for_udp_banned_ips_total_when_no_data ... ok +test statistics::metrics::tests::it_should_increase_counter_metric ... ok +test statistics::metrics::tests::udp_general_metrics::it_should_return_zero_for_udp_requests_aborted_when_no_data ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_sum_of_udp4_announces_handled ... ok +test statistics::metrics::tests::udp_general_metrics::it_should_return_zero_for_udp_requests_banned_when_no_data ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_sum_of_udp4_connections_handled ... ok +test statistics::metrics::tests::processing_time_moving_average::it_should_keep_the_fractional_part_of_the_previous_average ... ok +test statistics::metrics::tests::udp_general_metrics::it_should_return_exactly_a_udp_requests_aborted_total_that_an_f64_cannot_represent ... ok +test statistics::metrics::tests::it_should_return_zero_for_udp_processed_requests_total_when_no_data ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_sum_of_udp4_errors_handled ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_sum_of_udp4_responses ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_zero_for_udp4_connections_handled_when_no_data ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_zero_for_udp4_responses_when_no_data ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_sum_of_udp4_scrapes_handled ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_sum_of_udp4_requests ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_zero_for_udp4_requests_when_no_data ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_zero_for_udp4_scrapes_handled_when_no_data ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_sum_of_udp6_connections_handled ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_sum_of_udp6_errors_handled ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_zero_for_udp4_errors_handled_when_no_data ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_zero_for_udp6_connections_handled_when_no_data ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_zero_for_udp6_errors_handled_when_no_data ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_zero_for_udp6_requests_when_no_data ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_zero_for_udp6_responses_when_no_data ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_zero_for_udp6_scrapes_handled_when_no_data ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_sum_of_udp6_scrapes_handled ... ok +test statistics::repository::tests::it_should_allow_increasing_a_counter_metric_successfully ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_sum_of_udp6_announces_handled ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_zero_for_udp6_announces_handled_when_no_data ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_sum_of_udp6_responses ... ok +test statistics::metrics::tests::udpv6_metrics::it_should_return_sum_of_udp6_requests ... ok +test statistics::metrics::tests::udpv4_metrics::it_should_return_zero_for_udp4_announces_handled_when_no_data ... ok +test statistics::repository::tests::it_should_allow_setting_a_gauge_with_different_labels ... ok +test statistics::repository::tests::it_should_be_initialized_with_described_metrics ... ok +test statistics::repository::tests::it_should_allow_increasing_a_counter_multiple_times ... ok +test statistics::repository::tests::it_should_allow_increasing_a_counter_with_different_labels ... ok +test statistics::repository::tests::it_should_handle_error_cases_gracefully ... ok +test statistics::repository::tests::it_should_handle_concurrent_access ... ok +test statistics::repository::tests::it_should_handle_large_processing_times ... ok +test statistics::repository::tests::it_should_initialize_metrics_when_constructed_with_default ... ok +test statistics::repository::tests::it_should_overwrite_previous_value_when_setting_a_gauge_with_a_previous_value ... ok +test statistics::repository::tests::it_should_maintain_consistency_across_operations ... ok +test statistics::repository::tests::it_should_run_the_closure_on_the_metrics_and_return_its_result ... ok +test statistics::repository::tests::it_should_recalculate_separate_moving_averages_for_each_request_kind ... ok +test statistics::repository::tests::it_should_set_a_gauge_metric_successfully ... ok +test statistics::repository::tests::recalculate_average_methods_should_handle_zero_connections_gracefully ... ok +test testing::environment::tests::it_should_cancel_the_event_listeners_only_after_the_receive_loop_has_finished ... ok +test testing::environment::tests::it_should_map_disabled_connection_id_validation_policy ... ok +test testing::environment::tests::it_should_join_every_event_listener_before_reporting_a_receive_loop_failure ... ok +test testing::environment::tests::it_should_map_strict_connection_id_validation_policy ... ok +test statistics::repository::tests::race_conditions::it_should_handle_race_conditions_when_updating_udp_performance_metrics_in_parallel ... ok +test handlers::scrape::tests::scrape_request::it_should_return_the_persisted_downloads_of_torrents_absent_from_memory_in_request_order ... ok +test statistics::metrics::tests::processing_time_moving_average::it_should_not_drift_toward_the_fastest_requests_over_many_requests ... ok +test server::launcher::tests::receive_loop_shutdown::it_should_let_an_accepted_request_finish_and_answer_before_returning_on_cancellation ... ok +test testing::environment::tests::it_should_cancel_the_event_listeners_when_the_join_is_abandoned_while_the_receive_loop_runs ... ok +test server::processor::tests::it_should_publish_a_discard_event_when_a_client_uses_port_zero ... ok +test server::processor::tests::it_should_publish_a_response_sent_event_when_it_answers_a_connect_request ... ok +2026-11-21T13:32:34.952694Z ERROR torrust_tracker_udp_server::server::states: error=could not register UDP tracker service: a service is already registered for binding udp://127.136.185.221:56532 +test server::tests::token_aware_start::it_should_release_the_socket_when_registration_fails ... ok +test server::launcher::tests::it_should_publish_a_request_banned_event_when_its_client_ip_is_banned_in_strict_mode ... ok +test testing::environment::tests::it_should_count_the_statistics_events_of_a_request_answered_just_before_stop ... ok +2026-11-21T13:32:34.956787Z WARN torrust_tracker_udp_server::server::processor: failed to send bytes_count=16 error=Address family not supported by protocol (os error 97) payload=[0, 0, 0, 0, 0, 0, 0, 0, 16, 159, 105, 29, 5, 250, 145, 11] +2026-11-21T13:32:34.960742Z WARN UDP TRACKER: response error error=tracker scrape error: Connection cookie error: cookie value is expired: 0.0000000000000000000000000000000000000000000005714696852536039, expected > 1795267833.7769034 client_socket_addr=127.0.0.1:50068 server_socket_addr=0.0.0.0:47993 service_binding=udp://0.0.0.0:47993 request_id=68d6cdfc-cf23-4bb8-af16-aac23449da5d transaction_id=0 +2026-11-21T13:32:34.963689Z ERROR torrust_tracker_udp_server::server::states: error=could not bind UDP tracker listener: Address already in use (os error 98) +2026-11-21T13:32:34.963683Z ERROR UDP TRACKER: response error error=error parsing request: SendableRequestParseError { message: "Couldn't parse action", opt_connection_id: None, opt_transaction_id: None } client_socket_addr=127.0.0.1:39738 server_socket_addr=0.0.0.0:58196 service_binding=udp://0.0.0.0:58196 request_id=2ae50a68-3345-4c74-9be4-8659c576ddd3 +test server::processor::tests::it_should_keep_the_request_kind_in_the_error_response_event_when_a_parsed_request_fails ... ok +test server::processor::tests::it_should_return_a_send_error_when_the_response_cannot_be_sent ... ok +test server::tests::token_aware_start::it_should_register_the_service_with_a_health_check_that_reaches_the_running_server ... ok +test testing::environment::tests::it_should_stop_the_event_listeners_when_dropped_without_being_stopped ... ok +test testing::environment::tests::it_should_not_leave_event_listeners_running_when_the_udp_server_fails_to_start ... ok +test server::tests::token_aware_start::it_should_stop_the_receive_loop_and_release_the_socket_when_its_cancellation_token_is_cancelled ... ok +test testing::environment::tests::it_should_stop_without_a_join_failure_when_every_owned_task_finishes_through_cancellation ... ok +test testing::environment::tests::it_should_count_the_statistics_event_of_a_request_that_is_published_while_stop_drains_the_receive_loop ... ok +test testing::environment::tests::it_should_serve_requests_after_being_stopped_and_started_again ... ok +test server::processor::tests::it_should_publish_an_error_response_event_without_a_request_kind_when_the_payload_is_unparsable ... ok +2026-11-21T13:32:35.055149Z WARN UDP TRACKER: UDP request drain deadline reached: aborting remaining request processors service_binding="udp://127.0.0.1:37539" remaining=50 deadline=100ms +2026-11-21T13:32:35.055223Z WARN UDP TRACKER: UDP request processors drained service_binding="udp://127.0.0.1:37539" completed=0 failed=0 aborted=50 evicted=0 elapsed=100.244298ms +test server::launcher::tests::receive_loop_shutdown::it_should_not_return_while_processors_orphaned_by_the_request_ring_are_still_running ... ok +2026-11-21T13:32:35.064343Z WARN UDP TRACKER: UDP request drain deadline reached: aborting remaining request processors service_binding="udp://127.161.141.253:43664" remaining=50 deadline=100ms +2026-11-21T13:32:35.064396Z WARN UDP TRACKER: UDP request processors drained service_binding="udp://127.161.141.253:43664" completed=0 failed=0 aborted=50 evicted=0 elapsed=101.204115ms +test server::launcher::tests::receive_loop_shutdown::it_should_release_the_socket_once_the_processors_orphaned_by_the_request_ring_are_joined ... ok + +failures: + +---- event::tests::it_should_classify_a_nested_scrape_whitelist_error stdout ---- + +thread 'event::tests::it_should_classify_a_nested_scrape_whitelist_error' panicked at packages/udp-server/src/event.rs:348:9: +assertion failed: matches!(actual, ErrorKind::Whitelist(message) if message == + "The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted") + +---- event::tests::it_should_classify_a_direct_scrape_whitelist_error stdout ---- + +thread 'event::tests::it_should_classify_a_direct_scrape_whitelist_error' panicked at packages/udp-server/src/event.rs:366:9: +assertion failed: matches!(actual, ErrorKind::Whitelist(message) if message == + "The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted") +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + +---- event::tests::it_should_classify_a_nested_announce_whitelist_error stdout ---- + +thread 'event::tests::it_should_classify_a_nested_announce_whitelist_error' panicked at packages/udp-server/src/event.rs:308:9: +assertion failed: matches!(actual, ErrorKind::Whitelist(message) if message == + "The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted") + +---- event::tests::it_should_classify_a_whitelist_error stdout ---- + +thread 'event::tests::it_should_classify_a_whitelist_error' panicked at packages/udp-server/src/event.rs:290:9: +assertion failed: matches!(actual, ErrorKind::Whitelist(message) if message == + "The torrent: 3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0, is not whitelisted") + + +failures: + event::tests::it_should_classify_a_direct_scrape_whitelist_error + event::tests::it_should_classify_a_nested_announce_whitelist_error + event::tests::it_should_classify_a_nested_scrape_whitelist_error + event::tests::it_should_classify_a_whitelist_error + +test result: FAILED. 220 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.29s + +error: test failed, to rerun pass `-p torrust-tracker-udp-server --lib` diff --git a/docs/issues/open/2916-2912-si-4-tracker-core/manual-verification-evidence.md b/docs/issues/open/2916-2912-si-4-tracker-core/manual-verification-evidence.md new file mode 100644 index 0000000000..35b27486f2 --- /dev/null +++ b/docs/issues/open/2916-2912-si-4-tracker-core/manual-verification-evidence.md @@ -0,0 +1,395 @@ +--- +doc-type: manual-verification-evidence +issue-spec: docs/issues/open/2916-2912-si-4-tracker-core/ISSUE.md +last-updated-utc: "2026-11-21 13:43" +--- + + + +# Manual Verification Evidence + +## Purpose + +Record real, human-oriented verification of the completed behavior. This is +evidence from commands or interactions actually performed against the artifact; +do not invent commands, output, logs, or results. + +## Preserving Verification Artifacts + +The two tracker configurations, the request script and the UDP client lived in an agent scratchpad +outside the repository (`` below); they are embedded verbatim in this document. The +captured replies and the test runs are stored in the [`evidence/`](evidence/) folder of this issue: + +- [`evidence/responses-before.txt`](evidence/responses-before.txt) and + [`evidence/responses-after.txt`](evidence/responses-after.txt): the twelve requests and their + replies, before and after the fix. +- Red runs, at the commit `test(tracker-core): [#2916] add red tests that tracker-core error texts name no source path`: + [`evidence/tests-red-tracker-core.txt`](evidence/tests-red-tracker-core.txt), + [`evidence/tests-red-udp-server-lib.txt`](evidence/tests-red-udp-server-lib.txt), + [`evidence/tests-red-udp-server-integration.txt`](evidence/tests-red-udp-server-integration.txt), + [`evidence/tests-red-axum-http-server.txt`](evidence/tests-red-axum-http-server.txt) and + [`evidence/tests-red-axum-rest-api-server.txt`](evidence/tests-red-axum-rest-api-server.txt); + and the later red runs of three driver steps, + [`evidence/tests-red-driver-steps.txt`](evidence/tests-red-driver-steps.txt). +- Green run, at the commit `docs(axum-http-server): [#2916] show the tracker-core authentication failure reasons without source paths`: + [`evidence/tests-green.txt`](evidence/tests-green.txt). + +In the stored output the worktree path is replaced with ``, the Cargo home directory with +``, the REST API token with ``, and thread ids are removed; the rest of each line +is verbatim. + +## Environment and Prerequisites + +- Date and time (UTC): 2026-11-21 13:26 to 13:42. +- Artifact under test: the `torrust-tracker` binary (`cargo build --bin torrust-tracker`, debug + profile). "Before": built at 13:26 from the unchanged tree of `develop` at `4be22ee66`, before any + edit on the branch. "After": built at 13:41 from the commit + `fix(tracker-core): [#2916] replace LocatedError sources of peer key errors and drop torrust-located-error` + (`git diff --quiet HEAD` exited 0 before the build). The only later commit, + `docs(axum-http-server): ...`, changes module documentation only. +- Toolchain: stable Rust, `rustc 1.100.0 (0ef1bc386 2026-11-09)`; formatting with the nightly Rust + toolchain, `cargo 1.102.0-nightly (f93c676e3 2026-11-15)`. Clients: `curl 8.18.0` and + `Python 3.14.4` (the UDP client below). +- Operating system / environment: Linux 7.0.0-43-generic. +- Prerequisites and setup performed: two tracker instances started from the binary under test, one + listed (UDP, HTTP and REST API) and one private (HTTP and REST API), each with a fresh SQLite + database. The REST API token is the default development token of + `share/default/config/tracker.development.sqlite3.toml`. + +`listed.toml`: + +```toml +[metadata] +app = "torrust-tracker" +purpose = "configuration" +schema_version = "3.0.0" + +[logging] +trace_filter = "info" + +[core] +listed = true +private = false + +[core.database] +driver = "sqlite3" +path = "/listed.db" + +[[udp_trackers]] +bind_address = "127.0.0.1:17069" + +[[http_trackers]] +bind_address = "127.0.0.1:17070" + +[http_api] +bind_address = "127.0.0.1:17212" + +[http_api.access_tokens] +admin = "MyAccessToken" + +[health_check_api] +bind_address = "127.0.0.1:17313" +``` + +`private.toml`: + +```toml +[metadata] +app = "torrust-tracker" +purpose = "configuration" +schema_version = "3.0.0" + +[logging] +trace_filter = "info" + +[core] +listed = false +private = true + +[core.database] +driver = "sqlite3" +path = "/private.db" + +[[http_trackers]] +bind_address = "127.0.0.1:17080" + +[http_api] +bind_address = "127.0.0.1:17213" + +[http_api.access_tokens] +admin = "MyAccessToken" + +[health_check_api] +bind_address = "127.0.0.1:17314" +``` + +`udp_announce.py`, a minimal BEP 15 client (connect, then announce). No UDP client binary ships with +the workspace; the maintained check of the same reply is the UDP contract test listed under V1. + +```python +# Usage: python3 -I udp_announce.py +# Sends a BEP 15 connect and announce; prints the announce reply (error message if action 3). +import random, socket, struct, sys +port, ih = int(sys.argv[1]), bytes.fromhex(sys.argv[2]) +s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM); s.settimeout(5) +addr = ("127.0.0.1", port) +tx = random.getrandbits(32) +s.sendto(struct.pack(">QII", 0x41727101980, 0, tx), addr) +action, rtx, conn = struct.unpack(">IIQ", s.recv(2048)[:16]) +tx = random.getrandbits(32) +s.sendto(struct.pack(">QII20s20sQQQIIIiH", conn, 1, tx, ih, b"-qB00000000000000001", 0, 0, 0, 0, 0, 0, -1, 17548), addr) +data = s.recv(2048) +action, rtx = struct.unpack(">II", data[:8]) +print(f"action={action} message={data[8:].decode(errors='replace')!r}" if action == 3 else f"action={action} len={len(data)}") +``` + +`run.sh`, run as `run.sh before` and `run.sh after`. It starts +both trackers, waits for the four HTTP ports, sends the requests one after the other (each command +waits for its reply before the next starts, so W1 precedes W2, K1 precedes K2 and K4 precedes H4), +and stops the trackers with `SIGINT`: + +```bash +#!/usr/bin/env bash +# Usage: run.sh