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 a3f3e35
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions apollo-router/tests/integration/supergraph.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#[cfg(feature = "hyper_header_limits")]
use std::collections::HashMap;
use serde_json::json;
use tower::BoxError;

Expand Down Expand Up @@ -45,7 +47,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 +80,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 a3f3e35

Please sign in to comment.