-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable tests that should not have been run without graphos being ena…
…bled.
- Loading branch information
bryn
committed
Jun 6, 2024
1 parent
3d2269f
commit e2d7d97
Showing
5 changed files
with
85 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Disable GraphOS tests when apollo key not present ([PR #5362](https://github.com/apollographql/router/pull/5362)) | ||
|
||
A number of tests require APOLLO_KEY and APOLLO_GRAPH_REF to be present to execute successfully. | ||
These are now skipped if these env variables are not present. | ||
|
||
By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/5362 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
use crate::integration::common::graph_os_enabled; | ||
use insta::assert_yaml_snapshot; | ||
use tower::BoxError; | ||
|
||
use crate::integration::IntegrationTest; | ||
|
||
#[tokio::test(flavor = "multi_thread")] | ||
async fn test_error_not_propagated_to_client() -> Result<(), BoxError> { | ||
let mut router = IntegrationTest::builder() | ||
.config(include_str!("fixtures/broken_coprocessor.router.yaml")) | ||
.build() | ||
.await; | ||
if graph_os_enabled() { | ||
let mut router = IntegrationTest::builder() | ||
.config(include_str!("fixtures/broken_coprocessor.router.yaml")) | ||
.build() | ||
.await; | ||
|
||
router.start().await; | ||
router.assert_started().await; | ||
|
||
let (_trace_id, response) = router.execute_default_query().await; | ||
assert_eq!(response.status(), 500); | ||
assert_yaml_snapshot!(response.text().await?); | ||
router.assert_log_contains("INTERNAL_SERVER_ERROR").await; | ||
router.graceful_shutdown().await; | ||
router.start().await; | ||
router.assert_started().await; | ||
|
||
let (_trace_id, response) = router.execute_default_query().await; | ||
assert_eq!(response.status(), 500); | ||
assert_yaml_snapshot!(response.text().await?); | ||
router.assert_log_contains("INTERNAL_SERVER_ERROR").await; | ||
router.graceful_shutdown().await; | ||
} | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters