use std::sync::Arc; use axum::{ body::Body, http::{Request, StatusCode}, }; use felicia::{config::AppConfig, startup}; use tower::ServiceExt; #[tokio::test] async fn health_check_succeeds_with_correct_code() -> anyhow::Result<()> { std::env::set_var("LOCAL_LIST_PATH", "./tests/local.json"); let config = Arc::new(AppConfig::new()?); let app = startup::create_app(config.clone()).await?; let response = app .oneshot(Request::builder().uri("/healthcheck").body(Body::empty())?) .await?; assert_eq!(response.status(), StatusCode::NO_CONTENT); Ok(()) }