Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 2 týdny
12345678910111213141516171819202122232425
  1. //! Integration tests for the health endpoints.
  2. //!
  3. //! Uses `axum-test` for a zero-network in-process test client.
  4. use axum_test::TestServer;
  5. use serde_json::Value;
  6. mod common;
  7. #[tokio::test]
  8. async fn liveness_returns_200() {
  9. let server = common::test_server().await;
  10. let response = server.get("/health/live").await;
  11. response.assert_status_ok();
  12. let body: Value = response.json();
  13. assert_eq!(body["status"], "ok");
  14. }
  15. #[tokio::test]
  16. async fn readiness_returns_200() {
  17. let server = common::test_server().await;
  18. let response = server.get("/health/ready").await;
  19. response.assert_status_ok();
  20. }