File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use maedic::database::MaedicHealth;
33use crate :: helpers:: spawn_app;
44
55#[ tokio:: test]
6- async fn health_check_works ( ) {
6+ async fn test_self_health_works ( ) {
77 let app = spawn_app ( ) . await ;
88 let client = reqwest:: Client :: new ( ) ;
99
@@ -19,7 +19,7 @@ async fn health_check_works() {
1919}
2020
2121#[ tokio:: test]
22- async fn config_endpoint_works ( ) {
22+ async fn test_config_endpoint_works ( ) {
2323 let app = spawn_app ( ) . await ;
2424 let client = reqwest:: Client :: new ( ) ;
2525
@@ -31,3 +31,17 @@ async fn config_endpoint_works() {
3131
3232 assert ! ( response. status( ) . is_success( ) ) ;
3333}
34+
35+ #[ tokio:: test]
36+ async fn test_pw_health_endpoint_works_with_db ( ) {
37+ let app = spawn_app ( ) . await ;
38+ let client = reqwest:: Client :: new ( ) ;
39+
40+ let response = client
41+ . get ( format ! ( "{}/v1/health" , app. address) )
42+ . send ( )
43+ . await
44+ . expect ( "Failed to execute request" ) ;
45+
46+ assert ! ( response. status( ) . is_success( ) ) ;
47+ }
You can’t perform that action at this time.
0 commit comments