Skip to content

Refactor leftovers: split RunState::start; move 33 pure e2e tests into the library #7

Description

@JSBtechnologies

Two small items left over from the file-split refactor (which shipped in 0.38.0). Neither changes behavior.

1. Split RunState::start into named steps

src/run_loop/setup.rs:11-288 is one linear function of about 280 lines, over half of them comments: config, terminal setup, the ctl bind, the initial spawn, the renderer, the safety net. Split it into named steps, the way run(), fleet_up, dispatch_ctl, build_request and spawn_pane_full were split. Each step becomes a function with a doc comment, and start becomes the sequence.

2. Move the pure e2e tests into library unit tests

33 tests in the end-to-end binary test library code with no pty and no e2e support:

module tests tests
tests/atrium/input.rs 16 atrium::input (the prefix scanner)
tests/atrium/bar.rs 10 atrium::bar
tests/atrium/filter.rs 6 atrium::filter
tests/atrium/resolve.rs 1 the command resolver

As unit tests in the library they run under cargo test --lib <module>, which is the only test command a fleet builder may run. They also stop compiling the whole e2e binary for a pure check. Move them as-is; the per-module test count must not change.

Done when

python dev.py check is green, the total test count is unchanged, and the Linux suite passes under WSL.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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