@@ -444,21 +444,27 @@ mod integration_tests {
444444
445445 // Prepare test cases
446446 let mut test_cases = vec ! [ ] ;
447- if custom_health_path. is_none ( ) {
448- // When using default paths, test the default paths
449- test_cases. push ( ( "/health" , expected_status, expected_body) ) ;
450- } else {
451- // When using custom paths, default paths should not exist
452- test_cases. push ( ( "/health" , 404 , "Route not found" ) ) ;
453- test_cases. push ( ( custom_health_path. unwrap ( ) , expected_status, expected_body) ) ;
447+ match custom_health_path {
448+ None => {
449+ // When using default paths, test the default paths
450+ test_cases. push ( ( "/health" , expected_status, expected_body) ) ;
451+ }
452+ Some ( chp) => {
453+ // When using custom paths, default paths should not exist
454+ test_cases. push ( ( "/health" , 404 , "Route not found" ) ) ;
455+ test_cases. push ( ( chp, expected_status, expected_body) ) ;
456+ }
454457 }
455- if custom_live_path. is_none ( ) {
456- // When using default paths, test the default paths
457- test_cases. push ( ( "/live" , expected_status, expected_body) ) ;
458- } else {
459- // When using custom paths, default paths should not exist
460- test_cases. push ( ( "/live" , 404 , "Route not found" ) ) ;
461- test_cases. push ( ( custom_live_path. unwrap ( ) , expected_status, expected_body) ) ;
458+ match custom_live_path {
459+ None => {
460+ // When using default paths, test the default paths
461+ test_cases. push ( ( "/live" , expected_status, expected_body) ) ;
462+ }
463+ Some ( clp) => {
464+ // When using custom paths, default paths should not exist
465+ test_cases. push ( ( "/live" , 404 , "Route not found" ) ) ;
466+ test_cases. push ( ( clp, expected_status, expected_body) ) ;
467+ }
462468 }
463469 test_cases. push ( ( "/someRandomPathNotFoundHere" , 404 , "Route not found" ) ) ;
464470 assert_eq ! ( test_cases. len( ) , expected_num_tests) ;
0 commit comments