test(e2e): cross-process harness over the §12 seams #66
Reference in New Issue
Block a user
Delete Branch "issue/44-e2e-harness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #44.
Adds the e2e harness: the real
arrbinary spawned as a child process,wiremockfakes for Prowlarr and TMDB serving recorded fixtures, and a real Transmission container (CI service,just e2e-uplocally). Never a live tracker.arr-e2ebecomes 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 realarr-indexer/arr-metaclients, and the Transmission torrent lifecycle.ARR_TMDB_URLseam so the daemon can be pointed at the fake; rejected in the config file, matching the secrets rule.arr-meta/arr-apichanges 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
@@ -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");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.
Fixed in
cee6677by taking cargo's own answer: the build now runs with--message-format json-render-diagnosticsand the harness uses thecompiler-artifactmessage'sexecutablepath, 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 undercargo nextest run -p arr-e2ebefore this change. But resolving the path from cargo is sturdier either way.Reviewed
cee6677121. No findings.