Skip to content

Commit

Permalink
Enhance CORS Preflight Tests in API Gateway
Browse files Browse the repository at this point in the history
- Added additional CORS headers to the preflight tests for valid and simple input scenarios.
- Updated test cases to include 'Origin', 'Access-Control-Request-Method', and 'Access-Control-Request-Headers' in the CORS configuration, improving test coverage for API gateway functionality.
  • Loading branch information
zelosleone committed Jan 7, 2025
1 parent f02dd3e commit 58c0282
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions golem-worker-service-base/tests/api_gateway_end_to_end_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,11 @@ async fn test_api_def_with_cors_preflight_for_valid_input() {
Some("Content-Type, Authorization".to_string()),
Some(true),
Some(3600),
Some(vec![
"Origin".to_string(),
"Access-Control-Request-Method".to_string(),
"Access-Control-Request-Headers".to_string(),
]),
)
.unwrap();

Expand Down Expand Up @@ -753,6 +758,11 @@ async fn test_api_def_with_cors_preflight_for_preflight_input_and_simple_input()
Some("Content-Type, Authorization".to_string()),
Some(true),
Some(3600),
Some(vec![
"Origin".to_string(),
"Access-Control-Request-Method".to_string(),
"Access-Control-Request-Headers".to_string(),
]),
)
.unwrap();

Expand Down

0 comments on commit 58c0282

Please sign in to comment.