use crate::harness::{TestServer, test_config}; #[tokio::test] async fn health_endpoint_returns_200() { let server = TestServer::start(test_config(tempfile::tempdir().unwrap().keep())).await; let resp = TestServer::client() .get(server.url("/health")) .send() .await .expect("request failed"); assert_eq!(resp.status().as_u16(), 200); let body = resp.text().await.expect("failed to read body"); let json: serde_json::Value = serde_json::from_str(&body).expect("invalid JSON"); assert_eq!(json["status"], "ok"); }