Skip to content

Commit

Permalink
skip tests in mongodb 5
Browse files Browse the repository at this point in the history
  • Loading branch information
hallettj committed Aug 22, 2024
1 parent ae0ff46 commit 24b555e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
22 changes: 22 additions & 0 deletions crates/integration-tests/src/tests/aggregation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ async fn runs_aggregation_over_top_level_fields() -> anyhow::Result<()> {

#[tokio::test]
async fn aggregates_extended_json_representing_mixture_of_numeric_types() -> anyhow::Result<()> {
// Skip this test in MongoDB 5 because the example fails there. We're getting an error:
//
// > Kind: Command failed: Error code 5491300 (Location5491300): $documents' is not allowed in user requests, labels: {}
//
// This doesn't affect native queries that don't use the $documents stage.
if let Ok(image) = std::env::var("MONGODB_IMAGE") {
if image == "mongo:5" {
return Ok(());
}
}

assert_yaml_snapshot!(
graphql_query(
r#"
Expand Down Expand Up @@ -72,6 +83,17 @@ async fn aggregates_extended_json_representing_mixture_of_numeric_types() -> any

#[tokio::test]
async fn aggregates_mixture_of_numeric_and_null_values() -> anyhow::Result<()> {
// Skip this test in MongoDB 5 because the example fails there. We're getting an error:
//
// > Kind: Command failed: Error code 5491300 (Location5491300): $documents' is not allowed in user requests, labels: {}
//
// This doesn't affect native queries that don't use the $documents stage.
if let Ok(image) = std::env::var("MONGODB_IMAGE") {
if image == "mongo:5" {
return Ok(());
}
}

assert_yaml_snapshot!(
graphql_query(
r#"
Expand Down
11 changes: 11 additions & 0 deletions crates/integration-tests/src/tests/filtering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ use crate::graphql_query;

#[tokio::test]
async fn filters_on_extended_json_using_string_comparison() -> anyhow::Result<()> {
// Skip this test in MongoDB 5 because the example fails there. We're getting an error:
//
// > Kind: Command failed: Error code 5491300 (Location5491300): $documents' is not allowed in user requests, labels: {}
//
// This doesn't affect native queries that don't use the $documents stage.
if let Ok(image) = std::env::var("MONGODB_IMAGE") {
if image == "mongo:5" {
return Ok(());
}
}

assert_yaml_snapshot!(
graphql_query(
r#"
Expand Down

0 comments on commit 24b555e

Please sign in to comment.