Skip to content

Add qBittorrent end-to-end test harness for persistence refactor baseline #1706

@josecelano

Description

@josecelano

Summary

Add a high-level end-to-end test that validates tracker behavior through a complete torrent-sharing scenario using real containerized BitTorrent clients (qBittorrent), with SQLite as backend.

This is subissue 1525-02 from the persistence overhaul EPIC.

Why

The persistence refactor changes storage behavior underneath the tracker. A real-client full download cycle (seeder uploads -> leecher downloads -> tracker records completion) provides regression coverage beyond protocol-level tests.

Scope

  • Add compose scenario for tracker + qbittorrent-seeder + qbittorrent-leecher
  • Add Rust runner binary to orchestrate full scenario
  • Add shared docker compose wrapper for runner tooling
  • Verify leecher obtains byte-identical payload
  • Ensure unconditional teardown (docker compose down --volumes) on success/failure/panic
  • Use unique compose project names and dynamic port discovery for parallel-safe execution
  • Document local/CI execution workflow

Main Acceptance Criteria

  • Runner completes a full seeder -> leecher transfer against containerized tracker
  • Payload integrity is verified after download
  • No orphaned containers/volumes on success or failure
  • No fixed host ports; discovered dynamically
  • Temporary files are isolated and deleted on exit
  • cargo test --workspace --all-targets passes (or E2E explicitly excluded with documented opt-in)
  • linter all exits 0

Spec

Notes

Reference implementation exists in josecelano/torrust-tracker branch pr-1684-review (read-only behavioral reference).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions