diff --git a/crates/integration-tests/src/tests/aggregation.rs b/crates/integration-tests/src/tests/aggregation.rs index ac8c1503..6b35a1b3 100644 --- a/crates/integration-tests/src/tests/aggregation.rs +++ b/crates/integration-tests/src/tests/aggregation.rs @@ -40,17 +40,6 @@ 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#" @@ -83,17 +72,6 @@ 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#" diff --git a/crates/integration-tests/src/tests/expressions.rs b/crates/integration-tests/src/tests/expressions.rs index a525ad08..c6630e80 100644 --- a/crates/integration-tests/src/tests/expressions.rs +++ b/crates/integration-tests/src/tests/expressions.rs @@ -8,17 +8,6 @@ use crate::{connector::Connector, graphql_query, run_connector_query}; #[tokio::test] async fn evaluates_field_name_that_requires_escaping_in_nested_expression() -> 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 means that remote joins are not working in MongoDB 5 - if let Ok(image) = std::env::var("MONGODB_IMAGE") { - if image == "mongo:5" { - return Ok(()); - } - } - assert_yaml_snapshot!( graphql_query( r#" diff --git a/crates/integration-tests/src/tests/filtering.rs b/crates/integration-tests/src/tests/filtering.rs index 7ef45a21..a2b4b743 100644 --- a/crates/integration-tests/src/tests/filtering.rs +++ b/crates/integration-tests/src/tests/filtering.rs @@ -5,17 +5,6 @@ use crate::{connector::Connector, graphql_query, run_connector_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#" @@ -76,17 +65,6 @@ async fn filters_by_comparisons_on_elements_of_array_of_scalars() -> anyhow::Res #[tokio::test] async fn filters_by_comparisons_on_elements_of_array_of_scalars_against_variable( ) -> 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!( run_connector_query( Connector::SampleMflix, diff --git a/crates/integration-tests/src/tests/native_query.rs b/crates/integration-tests/src/tests/native_query.rs index aa9ec513..59e436f7 100644 --- a/crates/integration-tests/src/tests/native_query.rs +++ b/crates/integration-tests/src/tests/native_query.rs @@ -4,17 +4,6 @@ use ndc_test_helpers::{asc, binop, field, query, query_request, target, variable #[tokio::test] async fn runs_native_query_with_function_representation() -> 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#" @@ -55,17 +44,6 @@ async fn runs_native_query_with_collection_representation() -> anyhow::Result<() #[tokio::test] async fn runs_native_query_with_variable_sets() -> 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 means that remote joins are not working in MongoDB 5 - if let Ok(image) = std::env::var("MONGODB_IMAGE") { - if image == "mongo:5" { - return Ok(()); - } - } - assert_yaml_snapshot!( run_connector_query( Connector::SampleMflix, diff --git a/crates/integration-tests/src/tests/remote_relationship.rs b/crates/integration-tests/src/tests/remote_relationship.rs index fa1202c9..c607b30b 100644 --- a/crates/integration-tests/src/tests/remote_relationship.rs +++ b/crates/integration-tests/src/tests/remote_relationship.rs @@ -5,17 +5,6 @@ use serde_json::json; #[tokio::test] async fn provides_source_and_target_for_remote_relationship() -> 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 means that remote joins are not working in MongoDB 5 - if let Ok(image) = std::env::var("MONGODB_IMAGE") { - if image == "mongo:5" { - return Ok(()); - } - } - assert_yaml_snapshot!( graphql_query( r#" @@ -40,17 +29,6 @@ async fn provides_source_and_target_for_remote_relationship() -> anyhow::Result< #[tokio::test] async fn handles_request_with_single_variable_set() -> 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 means that remote joins are not working in MongoDB 5 - if let Ok(image) = std::env::var("MONGODB_IMAGE") { - if image == "mongo:5" { - return Ok(()); - } - } - assert_yaml_snapshot!( run_connector_query( Connector::SampleMflix, @@ -70,17 +48,6 @@ async fn handles_request_with_single_variable_set() -> anyhow::Result<()> { #[tokio::test] async fn variable_used_in_multiple_type_contexts() -> 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 means that remote joins are not working in MongoDB 5 - if let Ok(image) = std::env::var("MONGODB_IMAGE") { - if image == "mongo:5" { - return Ok(()); - } - } - assert_yaml_snapshot!( run_connector_query( Connector::SampleMflix, diff --git a/crates/integration-tests/src/tests/sorting.rs b/crates/integration-tests/src/tests/sorting.rs index b1667e24..30914b88 100644 --- a/crates/integration-tests/src/tests/sorting.rs +++ b/crates/integration-tests/src/tests/sorting.rs @@ -4,17 +4,6 @@ use crate::graphql_query; #[tokio::test] async fn sorts_on_extended_json() -> 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#" diff --git a/justfile b/justfile index 1092590d..219b64a4 100644 --- a/justfile +++ b/justfile @@ -37,9 +37,9 @@ test-e2e: (_arion "arion-compose/e2e-testing.nix" "test") # Run `just test-integration` on several MongoDB versions test-mongodb-versions: - MONGODB_IMAGE=mongo:5 just test-integration MONGODB_IMAGE=mongo:6 just test-integration MONGODB_IMAGE=mongo:7 just test-integration + MONGODB_IMAGE=mongo:8 just test-integration # Runs a specified service in a specified project config using arion (a nix # frontend for docker-compose). Propagates the exit status from that service.