swarm-controller: split main.rs into jobq, routes and startup modules
no behaviour change: a pure move of items and tests into new modules, plus visibility edits (pub(crate)) and path updates in sibling modules that named crate-root items. same routes, same OpenAPI, 561 tests before and after. why: #5470, new features stop landing in one 6.4k-line file by default. files outside swarm-controller/src: docs/agent-lifecycle/agent-roster.md, swarm-ui JobsPage.tsx and AgentsPage.tsx, nix/host-modules/swarm-controller.nix and swarm-grafana.nix hold comments that named main.rs for items that moved.
This commit is contained in:
parent
f0a6d6c042
commit
738dd1c95b
42 changed files with 6854 additions and 6680 deletions
|
|
@ -15,7 +15,7 @@ use utoipa::IntoParams;
|
|||
use crate::forge::{self, OpenPull};
|
||||
use crate::issue_report::issue_report_error_status;
|
||||
use crate::review_classifier::split_repo;
|
||||
use crate::{AppState, error_problem};
|
||||
use crate::routes::{AppState, error_problem};
|
||||
|
||||
/// Whose open pull requests to list.
|
||||
#[derive(Debug, Deserialize, IntoParams)]
|
||||
|
|
@ -117,9 +117,9 @@ mod tests {
|
|||
use tower::ServiceExt as _;
|
||||
|
||||
async fn get(uri: &str) -> (StatusCode, serde_json::Value) {
|
||||
let (state, _) = crate::tests::state_with_roster();
|
||||
let (state, _) = crate::routes::tests::state_with_roster();
|
||||
let req = Request::get(uri).body(Body::empty()).expect("a request");
|
||||
let res = crate::build_app(state)
|
||||
let res = crate::startup::build_app(state)
|
||||
.oneshot(req)
|
||||
.await
|
||||
.expect("infallible");
|
||||
|
|
|
|||
Loading…
Reference in a new issue