Files
nuchat/tests/healthcheck_test.rs
Fergus Molloy 9a2caf0921
Some checks failed
Cargo / build (push) Failing after 2m55s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
spawn app for each integration test
also adds missing dep to flake
2025-07-18 09:04:37 +01:00

15 lines
367 B
Rust

mod common;
use common::spawn_app;
use reqwest::StatusCode;
#[tokio::test]
async fn test_healthcheck() -> reqwest::Result<()> {
let address = spawn_app();
let response = reqwest::get(format!("{address}/api/healthcheck")).await?;
assert_eq!(response.status(), StatusCode::OK);
assert_eq!(response.text().await?, r#"{"healthy":true}"#);
Ok(())
}