All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 10s
22 lines
576 B
Rust
22 lines
576 B
Rust
use reqwest::StatusCode;
|
|
|
|
#[tokio::test]
|
|
async fn test_healthcheck() -> reqwest::Result<()> {
|
|
let response = reqwest::get("http://localhost:7000/healthcheck").await?;
|
|
|
|
assert_eq!(response.status(), StatusCode::OK);
|
|
assert_eq!(response.text().await?, r#"{"healthy":true}"#);
|
|
|
|
Ok(())
|
|
}
|
|
|
|
#[tokio::test]
|
|
async fn test_healthcheck2() -> reqwest::Result<()> {
|
|
let response = reqwest::get("http://localhost:7000/healthcheck").await?;
|
|
|
|
assert_eq!(response.status(), StatusCode::OK);
|
|
assert_eq!(response.text().await?, r#"{"healthy":true}"#);
|
|
|
|
Ok(())
|
|
}
|