diff --git a/services/api_gateway/src/auth/jwt/service.rs b/services/api_gateway/src/auth/jwt/service.rs index 18f530d30..cd077425d 100644 --- a/services/api_gateway/src/auth/jwt/service.rs +++ b/services/api_gateway/src/auth/jwt/service.rs @@ -429,15 +429,15 @@ impl JwtService { mod tests { use super::*; - #[test] - fn test_jwt_config_new_with_valid_secret() { + #[tokio::test] + async fn test_jwt_config_new_with_valid_secret() { // Set a high-entropy test JWT secret std::env::set_var( "JWT_SECRET", "Kx7mP@9nR!2sW#5vY$8bC&3fG*6jH^1kL%4pQ+7tZ-0uN~9dM=5eV(8xS)2wT!6yA#4zB" ); - let config = JwtConfig::new().expect("Should create config with valid JWT_SECRET"); + let config = JwtConfig::new().await.expect("Should create config with valid JWT_SECRET"); assert_eq!(config.jwt_issuer, "foxhunt-api-gateway"); assert_eq!(config.jwt_audience, "foxhunt-services"); @@ -446,11 +446,11 @@ mod tests { std::env::remove_var("JWT_SECRET"); } - #[test] - fn test_jwt_config_new_fails_without_secret() { + #[tokio::test] + async fn test_jwt_config_new_fails_without_secret() { std::env::remove_var("JWT_SECRET"); std::env::remove_var("JWT_SECRET_FILE"); - assert!(JwtConfig::new().is_err(), "Should fail without JWT_SECRET"); + assert!(JwtConfig::new().await.is_err(), "Should fail without JWT_SECRET"); } }