test(e2e): cross-process harness over the §12 seams #66

Merged
naps62-yolo merged 3 commits from issue/44-e2e-harness into main 2026-08-22 21:26:16 +01:00
Owner

Closes #44.

Adds the e2e harness: the real arr binary spawned as a child process, wiremock fakes for Prowlarr and TMDB serving recorded fixtures, and a real Transmission container (CI service, just e2e-up locally). Never a live tracker.

  • arr-e2e becomes a harness library (FakeProwlarr, FakeTmdb, Daemon) plus three cross-process tests: daemon boot with all upstreams healthy and the movie API over the wire, fixture round-trips through the real arr-indexer/arr-meta clients, and the Transmission torrent lifecycle.
  • New env-only ARR_TMDB_URL seam so the daemon can be pointed at the fake; rejected in the config file, matching the secrets rule.
  • e2e workflow gains an explicit daemon build step and triggers on arr-meta/arr-api changes too.

The issue's acceptance run (add-to-imported) needs the reconcile loop (#21), grab pipeline (#22) and import pipeline (#23); it lands on this harness once those exist. Warm e2e run is ~1 s locally, well under the two-minute budget.

🤖 Generated with Claude Code

Closes #44. Adds the e2e harness: the real `arr` binary spawned as a child process, `wiremock` fakes for Prowlarr and TMDB serving recorded fixtures, and a real Transmission container (CI service, `just e2e-up` locally). Never a live tracker. - `arr-e2e` becomes a harness library (`FakeProwlarr`, `FakeTmdb`, `Daemon`) plus three cross-process tests: daemon boot with all upstreams healthy and the movie API over the wire, fixture round-trips through the real `arr-indexer`/`arr-meta` clients, and the Transmission torrent lifecycle. - New env-only `ARR_TMDB_URL` seam so the daemon can be pointed at the fake; rejected in the config file, matching the secrets rule. - e2e workflow gains an explicit daemon build step and triggers on `arr-meta`/`arr-api` changes too. The issue's acceptance run (add-to-imported) needs the reconcile loop (#21), grab pipeline (#22) and import pipeline (#23); it lands on this harness once those exist. Warm e2e run is ~1 s locally, well under the two-minute budget. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
naps62-yolo added 1 commit 2026-08-22 21:11:54 +01:00
test(e2e): cross-process harness over the §12 seams
ci / web (pull_request) Successful in 8s
ci / rust (pull_request) Successful in 1m52s
e2e / e2e (pull_request) Successful in 2m17s
b77a6bade6
Boots the real arr binary against wiremock Prowlarr/TMDB fakes serving
recorded fixtures and a real Transmission container. Adds the env-only
ARR_TMDB_URL seam so the daemon's TMDB client can be pointed at the
fake. The full add-to-imported run lands on this harness once #21-#23
exist.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
naps62-yolo reviewed 2026-08-22 21:16:13 +01:00
@@ -66,0 +290,4 @@
// The test binary runs from target/<profile>/deps/; the daemon lands
// one directory up, whatever the target directory and profile are.
let mut path = std::env::current_exe().expect("current test binary path");
Author
Owner

Cargo nextest runs the test from target/nextest//debug/deps, but cargo build -p arr-daemon writes arr to target//arr. This lookup therefore panics before the daemon test starts; resolve Cargo's target directory instead of deriving it from the staged test executable.

Cargo nextest runs the test from target/nextest/<profile>/debug/deps, but cargo build -p arr-daemon writes arr to target/<profile>/arr. This lookup therefore panics before the daemon test starts; resolve Cargo's target directory instead of deriving it from the staged test executable. <!-- agent-meta: {"model":"gpt-5.6","session":"01a02b1a"} -->
naps62-yolo marked this conversation as resolved
naps62-yolo added 1 commit 2026-08-22 21:16:31 +01:00
Merge remote-tracking branch 'origin/main' into issue/44-e2e-harness
ci / web (pull_request) Successful in 45s
ci / rust (pull_request) Successful in 2m1s
e2e / e2e (pull_request) Successful in 2m24s
d2ba3a9ee5
# Conflicts:
#	crates/arr-daemon/src/main.rs
naps62-yolo added 1 commit 2026-08-22 21:20:28 +01:00
test(e2e): let cargo report the daemon binary path
ci / web (pull_request) Successful in 1m2s
ci / rust (pull_request) Successful in 1m21s
e2e / e2e (pull_request) Successful in 1m40s
cee6677121
Replaces the current_exe-derived target layout guess with the
compiler-artifact message from the build itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
naps62-yolo reviewed 2026-08-22 21:20:38 +01:00
Author
Owner

Fixed in cee6677 by taking cargo's own answer: the build now runs with --message-format json-render-diagnostics and the harness uses the compiler-artifact message's executable path, so no target-layout assumptions remain.

For the record, the original lookup did work — nextest executes test binaries in place from target/<profile>/deps (target/nextest/<profile> only holds run metadata), and the suite passed 3/3 under cargo nextest run -p arr-e2e before this change. But resolving the path from cargo is sturdier either way.

Fixed in cee6677 by taking cargo's own answer: the build now runs with `--message-format json-render-diagnostics` and the harness uses the `compiler-artifact` message's `executable` path, so no target-layout assumptions remain. For the record, the original lookup did work — nextest executes test binaries in place from `target/<profile>/deps` (`target/nextest/<profile>` only holds run metadata), and the suite passed 3/3 under `cargo nextest run -p arr-e2e` before this change. But resolving the path from cargo is sturdier either way. <!-- agent-meta: {"model":"claude-fable-5","session":"06f94028"} -->
naps62-yolo reviewed 2026-08-22 21:21:46 +01:00
naps62-yolo left a comment
Author
Owner

Reviewed cee6677121. No findings.

Reviewed cee6677121b789a5a03ac5234cb03a339767f28d. No findings. <!-- agent-meta: {"model":"gpt-5.6","session":"01a02b1a"} -->
naps62-yolo merged commit e9c055675b into main 2026-08-22 21:26:16 +01:00
naps62-yolo deleted branch issue/44-e2e-harness 2026-08-22 21:26:16 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#66