Skip to content

Commit

Permalink
Fix a couple of new tests from merge
Browse files Browse the repository at this point in the history
  • Loading branch information
bryn committed Dec 13, 2024
1 parent 1c0a232 commit 437f053
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions apollo-router/tests/integration/supergraph.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#[cfg(feature = "hyper_header_limits")]
use std::collections::HashMap;

use serde_json::json;
use tower::BoxError;

Expand Down Expand Up @@ -45,7 +48,12 @@ async fn test_supergraph_errors_on_http1_max_headers() -> Result<(), BoxError> {
}

let (_trace_id, response) = router
.execute_query_with_headers(&json!({ "query": "{ __typename }"}), headers)
.execute_query(
Query::builder()
.body(json!({ "query": "{ __typename }"}))
.headers(headers)
.build(),
)
.await;
assert_eq!(response.status(), 431);
Ok(())
Expand Down Expand Up @@ -73,7 +81,12 @@ async fn test_supergraph_allow_to_change_http1_max_headers() -> Result<(), BoxEr
}

let (_trace_id, response) = router
.execute_query_with_headers(&json!({ "query": "{ __typename }"}), headers)
.execute_query(
Query::builder()
.body(json!({ "query": "{ __typename }"}))
.headers(headers)
.build(),
)
.await;
assert_eq!(response.status(), 200);
assert_eq!(
Expand Down

0 comments on commit 437f053

Please sign in to comment.