summaryrefslogtreecommitdiff
path: root/tests/integration/health.rs
diff options
context:
space:
mode:
authorDawid Rycerz <dawid@rycerz.xyz>2026-01-22 22:07:32 +0100
committerDawid Rycerz <dawid@rycerz.xyz>2026-02-10 18:44:26 +0100
commit064a1d01c5c14f5ecc032fa9b8346a4a88b893f6 (patch)
treea2023f9ccd297ed8a41a3a0cc5699c2add09244d /tests/integration/health.rs
witryna 0.1.0 — initial releasev0.1.0
Minimalist Git-based static site deployment orchestrator. Webhook-triggered builds in Podman/Docker containers with atomic symlink publishing, SIGHUP hot-reload, and zero-downtime deploys. See README.md for usage, CHANGELOG.md for details.
Diffstat (limited to 'tests/integration/health.rs')
-rw-r--r--tests/integration/health.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/integration/health.rs b/tests/integration/health.rs
new file mode 100644
index 0000000..c8895c1
--- /dev/null
+++ b/tests/integration/health.rs
@@ -0,0 +1,17 @@
+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");
+}