//! `GET /healthz` — the one raw HTTP route (ADR-036). //! //! No auth, no call protocol, no `OperationContext`. Returns `200 OK` with a //! plain-text body (`"ok"`) if the endpoint is healthy. This is the //! infrastructure endpoint load balancers and orchestrators call; it must //! work before identity is resolvable. See //! `docs/architecture/crates/http/http-server.md` §"/healthz (raw route)". use axum::http::{header, HeaderValue, StatusCode}; use axum::response::IntoResponse; const HEALTHZ_BODY: &str = "ok"; pub async fn healthz() -> impl IntoResponse { ( StatusCode::OK, [(header::CONTENT_TYPE, HeaderValue::from_static("text/plain"))], HEALTHZ_BODY, ) } #[cfg(test)] mod tests { use super::*; use axum::body::Body; use axum::http::Request; use http_body_util::BodyExt; async fn call_healthz(req: Request
) -> axum::response::Response { let app = axum::Router::new().route("/healthz", axum::routing::get(healthz)); tower::ServiceExt::