Skip to content

SI-23: Relocate axum-rest-api-server test environment infrastructure to src/testing/ (EPIC #1669) #1903

Closed

Description

@josecelano

Subissue of EPIC #1669 — Overhaul: Packages

Part of the test environment relocation series:

  1. (prerequisite) Decouple rest-api-core from concrete UDP types
  2. This subissue (SI-23) — test env relocation
  3. SI-24: Relocate udp-server test environment
  4. SI-25: Relocate axum-http-server test environment

Problem

packages/axum-rest-api-server/src/environment.rs lives in production code (src/) but is only used by test code:

  • Internal tests: packages/axum-rest-api-server/tests/
  • External tests: packages/axum-health-check-api-server/tests/

The module depends on UdpTrackerServerContainer, UdpTrackerCoreContainer, initialize_static(), and BanService — all purely for test convenience. Despite being in src/, it is never used in production startup. It forces runtime dependencies on both UDP packages solely for test infrastructure.

Scope

  1. Relocate environment.rs to src/testing/environment.rs (Option A — consistent with existing tracker-core/src/test_helpers.rs pattern).
  2. Update Cargo.toml: move udp-server and udp-tracker-core from runtime dependencies to dev-dependencies.
  3. Update external consumers: packages/axum-health-check-api-server/tests/.
  4. Run cargo machete, linter all, cargo test --workspace.

Acceptance Criteria

  1. axum-rest-api-server/Cargo.toml has no udp-server or udp-tracker-core runtime dependency.
  2. axum-rest-api-server/src/environment.rs no longer exists (moved to src/testing/).
  3. cargo test --workspace passes.
  4. cargo machete passes.
  5. linter all passes.

Activity

  1. added
    Code Cleanup / Refactoring
    EPIC
    and removed
    EPIC
    on Jun 11, 2026
  2. self-assigned this
    on Jun 11, 2026
  3. added a commit that references this issue on Jun 15, 2026
    ab44a22
  4. added a commit that references this issue on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Code Cleanup / Refactoring

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions