From 615ee3309f8edd8e7f2e6cf5494d4d02e283b250 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Wed, 6 Dec 2023 15:53:03 +0100 Subject: [PATCH 01/18] Add a way to skip WASM tests --- .../query-tests-setup/src/connector_tag/mod.rs | 18 ++++++++++++------ .../src/connector_tag/postgres.rs | 18 ++++++++++++------ .../test-configs/libsql-wasm | 1 + .../test-configs/neon-wasm | 2 +- .../connector-test-kit-rs/test-configs/pg-wasm | 2 +- .../test-configs/planetscale-wasm | 2 +- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/mod.rs b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/mod.rs index 6cc6120f71c8..5269cd061da2 100644 --- a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/mod.rs +++ b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/mod.rs @@ -99,7 +99,9 @@ pub(crate) fn connection_string( Some(PostgresVersion::V12) if is_ci => { format!("postgresql://postgres:prisma@test-db-postgres-12:5432/{database}") } - Some(PostgresVersion::V13) | Some(PostgresVersion::NeonJs) | Some(PostgresVersion::PgJs) if is_ci => { + Some(PostgresVersion::V13) | Some(PostgresVersion::NeonJsNapi) | Some(PostgresVersion::PgJsNapi) + if is_ci => + { format!("postgresql://postgres:prisma@test-db-postgres-13:5432/{database}") } Some(PostgresVersion::V14) if is_ci => { @@ -116,7 +118,11 @@ pub(crate) fn connection_string( Some(PostgresVersion::V10) => format!("postgresql://postgres:prisma@127.0.0.1:5432/{database}"), Some(PostgresVersion::V11) => format!("postgresql://postgres:prisma@127.0.0.1:5433/{database}"), Some(PostgresVersion::V12) => format!("postgresql://postgres:prisma@127.0.0.1:5434/{database}"), - Some(PostgresVersion::V13) | Some(PostgresVersion::NeonJs) | Some(PostgresVersion::PgJs) => { + Some(PostgresVersion::V13) + | Some(PostgresVersion::NeonJsNapi) + | Some(PostgresVersion::PgJsNapi) + | Some(PostgresVersion::PgJsWasm) + | Some(PostgresVersion::NeonJsWasm) => { format!("postgresql://postgres:prisma@127.0.0.1:5435/{database}") } Some(PostgresVersion::V14) => format!("postgresql://postgres:prisma@127.0.0.1:5437/{database}"), @@ -380,8 +386,8 @@ mod tests { let only = vec![("postgres", None)]; let exclude = vec![("postgres", Some("neon.js"))]; let postgres = &PostgresConnectorTag as ConnectorTag; - let neon = ConnectorVersion::Postgres(Some(PostgresVersion::NeonJs)); - let pg = ConnectorVersion::Postgres(Some(PostgresVersion::PgJs)); + let neon = ConnectorVersion::Postgres(Some(PostgresVersion::NeonJsNapi)); + let pg = ConnectorVersion::Postgres(Some(PostgresVersion::PgJsNapi)); assert!(!super::should_run(&postgres, &neon, &only, &exclude, Default::default())); assert!(super::should_run(&postgres, &pg, &only, &exclude, Default::default())); @@ -393,7 +399,7 @@ mod tests { let only = vec![("postgres", None)]; let exclude = vec![("postgres", None)]; let postgres = &PostgresConnectorTag as ConnectorTag; - let neon = ConnectorVersion::Postgres(Some(PostgresVersion::NeonJs)); + let neon = ConnectorVersion::Postgres(Some(PostgresVersion::NeonJsNapi)); super::should_run(&postgres, &neon, &only, &exclude, Default::default()); } @@ -404,7 +410,7 @@ mod tests { let only = vec![("postgres", Some("neon.js"))]; let exclude = vec![("postgres", None)]; let postgres = &PostgresConnectorTag as ConnectorTag; - let neon = ConnectorVersion::Postgres(Some(PostgresVersion::NeonJs)); + let neon = ConnectorVersion::Postgres(Some(PostgresVersion::NeonJsNapi)); super::should_run(&postgres, &neon, &only, &exclude, Default::default()); } diff --git a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/postgres.rs b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/postgres.rs index 42d0a8c7afdc..2a839ab22584 100644 --- a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/postgres.rs +++ b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/postgres.rs @@ -36,8 +36,10 @@ pub enum PostgresVersion { V14, V15, PgBouncer, - NeonJs, - PgJs, + NeonJsNapi, + PgJsNapi, + NeonJsWasm, + PgJsWasm, } impl TryFrom<&str> for PostgresVersion { @@ -53,8 +55,10 @@ impl TryFrom<&str> for PostgresVersion { "14" => Self::V14, "15" => Self::V15, "pgbouncer" => Self::PgBouncer, - "neon.js" => Self::NeonJs, - "pg.js" => Self::PgJs, + "neon.js" => Self::NeonJsNapi, + "pg.js" => Self::PgJsNapi, + "pg.js.wasm" => Self::PgJsWasm, + "neon.js.wasm" => Self::NeonJsWasm, _ => return Err(TestError::parse_error(format!("Unknown Postgres version `{s}`"))), }; @@ -73,8 +77,10 @@ impl ToString for PostgresVersion { PostgresVersion::V14 => "14", PostgresVersion::V15 => "15", PostgresVersion::PgBouncer => "pgbouncer", - PostgresVersion::NeonJs => "neon.js", - PostgresVersion::PgJs => "pg.js", + PostgresVersion::NeonJsNapi => "neon.js", + PostgresVersion::PgJsNapi => "pg.js", + PostgresVersion::PgJsWasm => "pg.js.wasm", + PostgresVersion::NeonJsWasm => "pg.js.wasm", } .to_owned() } diff --git a/query-engine/connector-test-kit-rs/test-configs/libsql-wasm b/query-engine/connector-test-kit-rs/test-configs/libsql-wasm index b93966875dea..96ca6a4d7f13 100644 --- a/query-engine/connector-test-kit-rs/test-configs/libsql-wasm +++ b/query-engine/connector-test-kit-rs/test-configs/libsql-wasm @@ -1,5 +1,6 @@ { "connector": "sqlite", + "version": "libsql.js.wasm", "driver_adapter": "libsql", "external_test_executor": "Wasm" } \ No newline at end of file diff --git a/query-engine/connector-test-kit-rs/test-configs/neon-wasm b/query-engine/connector-test-kit-rs/test-configs/neon-wasm index 2697c5227399..132796d62ee7 100644 --- a/query-engine/connector-test-kit-rs/test-configs/neon-wasm +++ b/query-engine/connector-test-kit-rs/test-configs/neon-wasm @@ -1,6 +1,6 @@ { "connector": "postgres", - "version": "13", + "version": "neon.js.wasm", "driver_adapter": "neon:ws", "driver_adapter_config": { "proxy_url": "127.0.0.1:5488/v1" }, "external_test_executor": "Wasm" diff --git a/query-engine/connector-test-kit-rs/test-configs/pg-wasm b/query-engine/connector-test-kit-rs/test-configs/pg-wasm index b5d8ac3c7b15..a71ea4ece7bb 100644 --- a/query-engine/connector-test-kit-rs/test-configs/pg-wasm +++ b/query-engine/connector-test-kit-rs/test-configs/pg-wasm @@ -1,6 +1,6 @@ { "connector": "postgres", - "version": "13", + "version": "pg.js.wasm", "driver_adapter": "pg", "external_test_executor": "Wasm" } \ No newline at end of file diff --git a/query-engine/connector-test-kit-rs/test-configs/planetscale-wasm b/query-engine/connector-test-kit-rs/test-configs/planetscale-wasm index 62dd895e970c..b9f190e064c6 100644 --- a/query-engine/connector-test-kit-rs/test-configs/planetscale-wasm +++ b/query-engine/connector-test-kit-rs/test-configs/planetscale-wasm @@ -1,6 +1,6 @@ { "connector": "vitess", - "version": "planetscale.js", + "version": "planetscale.js.wasm", "driver_adapter": "planetscale", "driver_adapter_config": { "proxy_url": "http://root:root@127.0.0.1:8085" From cffeb90f7a27477d825a1897fc510ddda3612bd1 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Wed, 6 Dec 2023 15:53:19 +0100 Subject: [PATCH 02/18] Temproary skip failing wasm tests on pg and neon --- .../tests/new/assertion_violation_error.rs | 10 +++++++++- .../query-engine-tests/tests/new/metrics.rs | 4 ++-- .../tests/new/regressions/max_integer.rs | 11 ++++++++++- .../tests/new/regressions/prisma_7434.rs | 4 ++-- .../tests/queries/batch/in_selection_batching.rs | 4 ++-- .../tests/queries/data_types/bytes.rs | 5 ++++- .../tests/queries/data_types/through_relation.rs | 4 ++-- .../queries/filters/field_reference/bigint_filter.rs | 6 +++++- .../queries/filters/field_reference/bytes_filter.rs | 12 ++++++++++-- .../filters/field_reference/datetime_filter.rs | 6 +++++- .../queries/filters/field_reference/float_filter.rs | 6 +++++- .../queries/filters/field_reference/int_filter.rs | 6 +++++- .../queries/filters/field_reference/string_filter.rs | 6 +++++- .../query-engine-tests/tests/queries/filters/json.rs | 3 +-- .../tests/queries/filters/list_filters.rs | 8 ++++++-- .../query-engine-tests/tests/raw/sql/casts.rs | 2 +- .../query-engine-tests/tests/raw/sql/errors.rs | 2 +- .../tests/raw/sql/input_coercion.rs | 2 +- .../query-engine-tests/tests/raw/sql/null_list.rs | 2 +- .../query-engine-tests/tests/raw/sql/typed_output.rs | 2 +- .../tests/writes/data_types/bigint.rs | 2 +- .../tests/writes/data_types/bytes.rs | 7 +++++-- .../tests/writes/data_types/native_types/postgres.rs | 8 ++++++-- .../tests/writes/data_types/scalar_list/base.rs | 6 +++--- .../tests/writes/data_types/scalar_list/defaults.rs | 2 +- 25 files changed, 94 insertions(+), 36 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/assertion_violation_error.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/assertion_violation_error.rs index 73455011d04e..62add25c3e72 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/assertion_violation_error.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/assertion_violation_error.rs @@ -2,7 +2,15 @@ use query_engine_tests::*; #[test_suite(schema(generic))] mod raw_params { - #[connector_test(only(Postgres), exclude(Postgres("neon.js"), Postgres("pg.js")))] + #[connector_test( + only(Postgres), + exclude( + Postgres("neon.js"), + Postgres("pg.js"), + Postgres("neon.js.wasm"), + Postgres("pg.js.wasm") + ) + )] async fn value_too_many_bind_variables(runner: Runner) -> TestResult<()> { let n = 32768; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs index cd270bb334c6..62bea4c56db8 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs @@ -17,7 +17,7 @@ mod metrics { use query_engine_tests::*; use serde_json::Value; - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] async fn metrics_are_recorded(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { createOneTestModel(data: { id: 1 }) { id }}"#), @@ -48,7 +48,7 @@ mod metrics { Ok(()) } - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] async fn metrics_tx_do_not_go_negative(mut runner: Runner) -> TestResult<()> { let tx_id = runner.start_tx(5000, 5000, None).await?; runner.set_active_tx(tx_id.clone()); diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/max_integer.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/max_integer.rs index 78206f6394a6..e00b2d22e198 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/max_integer.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/max_integer.rs @@ -187,7 +187,16 @@ mod max_integer { schema.to_owned() } - #[connector_test(schema(overflow_pg), only(Postgres), exclude(Postgres("neon.js"), Postgres("pg.js")))] + #[connector_test( + schema(overflow_pg), + only(Postgres), + exclude( + Postgres("neon.js"), + Postgres("pg.js"), + Postgres("neon.js.wasm"), + Postgres("pg.js.wasm") + ) + )] async fn unfitted_int_should_fail_pg_quaint(runner: Runner) -> TestResult<()> { // int assert_error!( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs index e5fa8388d66e..0b82b0acd7ba 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs @@ -4,7 +4,7 @@ use query_engine_tests::*; mod not_in_batching { use query_engine_tests::Runner; - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] async fn not_in_batch_filter(runner: Runner) -> TestResult<()> { runner.query(r#"mutation { createManyTestModel(data: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]) { count }}"#).await?.assert_success(); @@ -22,7 +22,7 @@ mod not_in_batching { mod not_in_batching_cockroachdb { use query_engine_tests::Runner; - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] async fn not_in_batch_filter(runner: Runner) -> TestResult<()> { runner.query(r#"mutation { createManyTestModel(data: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]) { count }}"#).await?.assert_success(); diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs index f5e7face6768..b315c1b84720 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs @@ -88,7 +88,7 @@ mod isb { Ok(()) } - #[connector_test(exclude(MongoDb))] + #[connector_test(exclude(MongoDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] async fn order_by_aggregation_should_fail(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -103,7 +103,7 @@ mod isb { Ok(()) } - #[connector_test(exclude(MongoDb), capabilities(FullTextSearchWithoutIndex))] + #[connector_test(exclude(MongoDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] async fn order_by_relevance_should_fail(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs index a4957d75e1ab..232240175c46 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs @@ -1,6 +1,9 @@ use query_engine_tests::*; -#[test_suite(schema(common_nullable_types))] +#[test_suite( + schema(common_nullable_types), + exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")) +)] mod bytes { use query_engine_tests::{run_query, EngineProtocol, Runner}; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs index b2af72ab955e..09cffe23edac 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs @@ -34,7 +34,7 @@ mod scalar_relations { // TODO: fix https://github.com/prisma/team-orm/issues/684, https://github.com/prisma/team-orm/issues/685 and unexclude DAs #[connector_test( schema(schema_common), - exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js")) + exclude(Postgres("pg.js", "neon.js", "pg.js.wasm", "neon.js.wasm"), Vitess("planetscale.js")) )] async fn common_types(runner: Runner) -> TestResult<()> { create_common_children(&runner).await?; @@ -236,7 +236,7 @@ mod scalar_relations { #[connector_test( schema(schema_scalar_lists), capabilities(ScalarLists), - exclude(Postgres("pg.js", "neon.js")) + exclude(Postgres("pg.js", "neon.js", "pg.js.wasm", "neon.js.wasm")) )] async fn scalar_lists(runner: Runner) -> TestResult<()> { create_child( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs index bcd12fb1b5b7..48035b3d121a 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs @@ -137,7 +137,11 @@ mod bigint_filter { Ok(()) } - #[connector_test(schema(setup::common_list_types), capabilities(ScalarLists))] + #[connector_test( + schema(setup::common_list_types), + exclude(Postgres("pg.js.wasm", "neon.js.wasm")), + capabilities(ScalarLists) + )] async fn scalar_list_filters(runner: Runner) -> TestResult<()> { setup::test_data_list_common(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs index bcb4a76c6158..ac5ad3d17c67 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs @@ -28,7 +28,11 @@ mod bytes_filter { Ok(()) } - #[connector_test(schema(setup::common_mixed_types), capabilities(ScalarLists))] + #[connector_test( + schema(setup::common_mixed_types), + exclude(Postgres("pg.js.wasm", "neon.js.wasm")), + capabilities(ScalarLists) + )] async fn inclusion_filter(runner: Runner) -> TestResult<()> { setup::test_data_common_mixed_types(&runner).await?; @@ -50,7 +54,11 @@ mod bytes_filter { Ok(()) } - #[connector_test(schema(setup::common_list_types), capabilities(ScalarLists))] + #[connector_test( + schema(setup::common_mixed_types), + exclude(Postgres("pg.js.wasm", "neon.js.wasm")), + capabilities(ScalarLists) + )] async fn scalar_list_filters(runner: Runner) -> TestResult<()> { setup::test_data_list_common(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs index 327379bd4903..e3f13bdff124 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs @@ -137,7 +137,11 @@ mod datetime_filter { Ok(()) } - #[connector_test(schema(setup::common_list_types), capabilities(ScalarLists))] + #[connector_test( + schema(setup::common_list_types), + capabilities(ScalarLists), + exclude(Postgres("pg.js.wasm", "neon.js.wasm")) + )] async fn scalar_list_filters(runner: Runner) -> TestResult<()> { setup::test_data_list_common(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs index 5dfae5f09c36..580b7f31bc39 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs @@ -137,7 +137,11 @@ mod float_filter { Ok(()) } - #[connector_test(schema(setup::common_list_types), capabilities(ScalarLists))] + #[connector_test( + schema(setup::common_list_types), + exclude(Postgres("pg.js.wasm", "neon.js.wasm")), + capabilities(ScalarLists) + )] async fn scalar_list_filters(runner: Runner) -> TestResult<()> { setup::test_data_list_common(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs index 972539ec1f15..7eb29602c642 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs @@ -137,7 +137,11 @@ mod int_filter { Ok(()) } - #[connector_test(schema(setup::common_list_types), capabilities(ScalarLists))] + #[connector_test( + schema(setup::common_list_types), + exclude(Postgres("pg.js.wasm", "neon.js.wasm")), + capabilities(ScalarLists) + )] async fn scalar_list_filters(runner: Runner) -> TestResult<()> { setup::test_data_list_common(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs index f9c2e6e06acc..787f9642c4a2 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs @@ -435,7 +435,11 @@ mod string_filter { Ok(()) } - #[connector_test(schema(setup::common_list_types), capabilities(ScalarLists))] + #[connector_test( + schema(setup::common_list_types), + exclude(Postgres("pg.js.wasm", "neon.js.wasm")), + capabilities(ScalarLists) + )] async fn scalar_list_filters_sensitive(runner: Runner) -> TestResult<()> { setup::test_data_list_common(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json.rs index d1b62a086153..e4d160a9bae9 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json.rs @@ -213,8 +213,7 @@ mod json { schema(json_opt), exclude( Vitess("planetscale.js"), - Postgres("neon.js"), - Postgres("pg.js"), + Postgres("neon.js", "pg.js", "neon.js.wasm", "pg.js.wasm"), Sqlite("libsql.js"), MySQL(5.6) ) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/list_filters.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/list_filters.rs index 16b9a0ab0437..f34675ba3ff1 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/list_filters.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/list_filters.rs @@ -1,6 +1,10 @@ use query_engine_tests::*; -#[test_suite(schema(common_list_types), capabilities(ScalarLists))] +#[test_suite( + schema(common_list_types), + exclude(Postgres("pg.js.wasm", "neon.js.wasm")), + capabilities(ScalarLists) +)] mod lists { use indoc::indoc; use query_engine_tests::run_query; @@ -623,7 +627,7 @@ mod lists { } // Cockroachdb does not like the bytes empty array check in v21 but this will be fixed in 22. - #[connector_test(exclude(CockroachDB))] + #[connector_test(exclude(CockroachDB), exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn is_empty_bytes(runner: Runner) -> TestResult<()> { test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/casts.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/casts.rs index c03067eed818..146892889beb 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/casts.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/casts.rs @@ -18,7 +18,7 @@ mod casts { // // Bails with: ERROR: invalid input syntax for type integer: "42.51" // - #[connector_test(only(Postgres), exclude(Postgres("neon.js"), Postgres("pg.js")))] + #[connector_test(only(Postgres), exclude(Postgres("neon.js", "pg.js", "neon.js.wasm", "pg.js.wasm")))] async fn query_numeric_casts(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query_pretty!(&runner, fmt_query_raw(r#" diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/errors.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/errors.rs index cb44a2285ff2..4d38c60b5b75 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/errors.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/errors.rs @@ -37,7 +37,7 @@ mod raw_errors { #[connector_test( schema(common_nullable_types), only(Postgres), - exclude(Postgres("neon.js"), Postgres("pg.js")) + exclude(Postgres("neon.js", "pg.js", "neon.js.wasm", "pg.js.wasm")) )] async fn list_param_for_scalar_column_should_not_panic_quaint(runner: Runner) -> TestResult<()> { assert_error!( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs index eac2bc42b4cd..349fa121e3a7 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs @@ -5,7 +5,7 @@ mod input_coercion { use query_engine_tests::fmt_execute_raw; // Checks that query raw inputs are coerced to the correct types - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn scalar_input_correctly_coerced(runner: Runner) -> TestResult<()> { run_query!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs index 32a8a8ef281d..ea10f5da0905 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs @@ -5,7 +5,7 @@ use query_engine_tests::*; mod null_list { use query_engine_tests::{fmt_query_raw, run_query, run_query_pretty}; - #[connector_test(schema(common_list_types))] + #[connector_test(schema(common_list_types), exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn null_scalar_lists(runner: Runner) -> TestResult<()> { run_query!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/typed_output.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/typed_output.rs index c3687ddd9f3e..f49433ef745f 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/typed_output.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/typed_output.rs @@ -26,7 +26,7 @@ mod typed_output { schema.to_owned() } - #[connector_test(schema(schema_pg), only(Postgres))] + #[connector_test(schema(schema_pg), only(Postgres), exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn all_scalars_pg(runner: Runner) -> TestResult<()> { create_row( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs index 1cb9adf534a8..13b941fc8071 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs @@ -17,7 +17,7 @@ mod bigint { } // "Using a BigInt field" should "work" - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn using_bigint_field(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs index 791b0a2137fb..e5c0bc3a1e7a 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs @@ -1,6 +1,6 @@ use query_engine_tests::*; -#[test_suite] +#[test_suite(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] mod bytes { use indoc::indoc; use query_engine_tests::run_query; @@ -77,7 +77,10 @@ mod bytes { Ok(()) } - #[connector_test(schema(bytes_id), exclude(MySQL, Vitess, SqlServer))] + #[connector_test( + schema(bytes_id), + exclude(MySQL, Vitess, SqlServer, Postgres("pg.js.wasm", "neon.js.wasm")) + )] async fn byte_id_coercion(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(runner, r#" diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs index 2d487ec4f137..d87f326b2119 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs @@ -23,7 +23,7 @@ mod postgres { } //"Postgres native int types" should "work" - #[connector_test(schema(schema_int))] + #[connector_test(schema(schema_int), exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn native_int_types(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { @@ -191,7 +191,11 @@ mod postgres { } // "Other Postgres native types" should "work" - #[connector_test(schema(schema_other_types), only(Postgres), exclude(CockroachDb))] + #[connector_test( + schema(schema_other_types), + only(Postgres), + exclude(CockroachDb, Postgres("pg.js.wasm", "neon.js.wasm")) + )] async fn native_other_types(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/scalar_list/base.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/scalar_list/base.rs index 9a5e74dd8547..2bd989573da8 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/scalar_list/base.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/scalar_list/base.rs @@ -28,7 +28,7 @@ mod basic_types { schema.to_owned() } - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn set_base(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, format!(r#"mutation {{ @@ -59,7 +59,7 @@ mod basic_types { // "Scalar lists" should "be behave like regular values for create and update operations" // Skipped for CockroachDB as enum array concatenation is not supported (https://github.com/cockroachdb/cockroach/issues/71388). - #[connector_test(exclude(CockroachDb))] + #[connector_test(exclude(CockroachDb, Postgres("pg.js.wasm", "neon.js.wasm")))] async fn behave_like_regular_val_for_create_and_update(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, format!(r#"mutation {{ @@ -158,7 +158,7 @@ mod basic_types { } // "A Create Mutation" should "create and return items with list values with shorthand notation" - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn create_mut_work_with_list_vals(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, format!(r#"mutation {{ diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/scalar_list/defaults.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/scalar_list/defaults.rs index 39370e62c572..c216b36ae458 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/scalar_list/defaults.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/scalar_list/defaults.rs @@ -29,7 +29,7 @@ mod basic { schema.to_owned() } - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn basic_write(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { From de28ce484eccef390733559123393269d65f0069 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Wed, 6 Dec 2023 16:40:13 +0100 Subject: [PATCH 03/18] Skip timstamp test --- .../query-engine-tests/tests/new/regressions/prisma_12572.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_12572.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_12572.rs index 35f056f8fa80..9a901a57dfff 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_12572.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_12572.rs @@ -26,7 +26,7 @@ mod prisma_12572 { .to_owned() } - #[connector_test] + #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn all_generated_timestamps_are_the_same(runner: Runner) -> TestResult<()> { runner .query(r#"mutation { createOneTest1(data: {id:"one", test2s: { create: {id: "two"}}}) { id }}"#) From 03e8c9ffb9b4789b98cb7137de5da588979bc2fa Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 12:04:27 +0100 Subject: [PATCH 04/18] Fix incorrect skips --- .../query-engine-tests/tests/new/metrics.rs | 7 +++---- .../tests/new/regressions/prisma_7434.rs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs index 62bea4c56db8..07590b6e75b4 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs @@ -4,8 +4,7 @@ use query_engine_tests::test_suite; schema(generic), exclude( Vitess("planetscale.js"), - Postgres("neon.js"), - Postgres("pg.js"), + Postgres("neon.js", "pg.js", "neon.js.wasm", "pg.js.wasm"), Sqlite("libsql.js") ) )] @@ -17,7 +16,7 @@ mod metrics { use query_engine_tests::*; use serde_json::Value; - #[connector_test(exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] + #[connector_test] async fn metrics_are_recorded(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { createOneTestModel(data: { id: 1 }) { id }}"#), @@ -48,7 +47,7 @@ mod metrics { Ok(()) } - #[connector_test(exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] + #[connector_test] async fn metrics_tx_do_not_go_negative(mut runner: Runner) -> TestResult<()> { let tx_id = runner.start_tx(5000, 5000, None).await?; runner.set_active_tx(tx_id.clone()); diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs index 0b82b0acd7ba..cf05a8b9a85a 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs @@ -4,7 +4,7 @@ use query_engine_tests::*; mod not_in_batching { use query_engine_tests::Runner; - #[connector_test(exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] + #[connector_test(exclude(CockroachDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] async fn not_in_batch_filter(runner: Runner) -> TestResult<()> { runner.query(r#"mutation { createManyTestModel(data: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]) { count }}"#).await?.assert_success(); From 1cce0a96547ac6a843f7aded80776d0e1bdfca39 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 12:08:35 +0100 Subject: [PATCH 05/18] Parse libsql.js.wasm version --- .../query-tests-setup/src/connector_tag/sqlite.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/sqlite.rs b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/sqlite.rs index 5f4dab56784a..2173bbdd38f2 100644 --- a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/sqlite.rs +++ b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/sqlite.rs @@ -29,14 +29,16 @@ impl ConnectorTagInterface for SqliteConnectorTag { #[derive(Clone, Debug, PartialEq, Eq)] pub enum SqliteVersion { V3, - LibsqlJS, + LibsqlJsNapi, + LibsqlJsWasm, } impl ToString for SqliteVersion { fn to_string(&self) -> String { match self { SqliteVersion::V3 => "3".to_string(), - SqliteVersion::LibsqlJS => "libsql.js".to_string(), + SqliteVersion::LibsqlJsNapi => "libsql.js".to_string(), + SqliteVersion::LibsqlJsWasm => "libsql.js.wasm".to_string(), } } } @@ -47,7 +49,8 @@ impl TryFrom<&str> for SqliteVersion { fn try_from(s: &str) -> Result { let version = match s { "3" => Self::V3, - "libsql.js" => Self::LibsqlJS, + "libsql.js" => Self::LibsqlJsNapi, + "libsql.js.wasm" => Self::LibsqlJsWasm, _ => return Err(TestError::parse_error(format!("Unknown SQLite version `{s}`"))), }; Ok(version) From e6dc74c8fbddbbcea5815cadb9800a555485f022 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 15:18:24 +0100 Subject: [PATCH 06/18] Skip libsql wasm tests --- .../query-engine-tests/tests/new/metrics.rs | 2 +- .../tests/new/regressions/prisma_15204.rs | 8 ++++---- .../tests/new/regressions/prisma_7434.rs | 4 ++-- .../tests/queries/batch/in_selection_batching.rs | 4 ++-- .../query-engine-tests/tests/queries/data_types/bytes.rs | 2 +- .../tests/queries/data_types/through_relation.rs | 2 +- .../tests/queries/filters/bigint_filter.rs | 2 +- .../tests/queries/filters/bytes_filter.rs | 2 +- .../queries/filters/field_reference/bigint_filter.rs | 4 ++-- .../tests/queries/filters/field_reference/bytes_filter.rs | 2 +- .../queries/filters/field_reference/datetime_filter.rs | 4 ++-- .../tests/queries/filters/field_reference/float_filter.rs | 4 ++-- .../tests/queries/filters/field_reference/int_filter.rs | 4 ++-- .../queries/filters/field_reference/string_filter.rs | 6 +++--- .../query-engine-tests/tests/raw/sql/input_coercion.rs | 2 +- .../query-engine-tests/tests/raw/sql/null_list.rs | 2 +- .../query-engine-tests/tests/raw/sql/typed_output.rs | 2 +- .../query-engine-tests/tests/writes/data_types/bigint.rs | 2 +- .../query-engine-tests/tests/writes/data_types/bytes.rs | 4 ++-- .../tests/writes/data_types/native_types/postgres.rs | 2 +- 20 files changed, 32 insertions(+), 32 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs index 07590b6e75b4..4e9edf0adc3f 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs @@ -5,7 +5,7 @@ use query_engine_tests::test_suite; exclude( Vitess("planetscale.js"), Postgres("neon.js", "pg.js", "neon.js.wasm", "pg.js.wasm"), - Sqlite("libsql.js") + Sqlite("libsql.js", "libsql.js.wasm") ) )] mod metrics { diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_15204.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_15204.rs index 8582c14d0bc0..73ae4322db6b 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_15204.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_15204.rs @@ -24,7 +24,7 @@ mod conversion_error { schema.to_owned() } - #[connector_test(schema(schema_int), only(Sqlite), exclude(Sqlite("libsql.js")))] + #[connector_test(schema(schema_int), only(Sqlite), exclude(Sqlite("libsql.js"), Sqlite("libsql.js.wasm")))] async fn convert_to_int_sqlite_quaint(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -38,7 +38,7 @@ mod conversion_error { Ok(()) } - #[connector_test(schema(schema_int), only(Sqlite("libsql.js")))] + #[connector_test(schema(schema_int), only(Sqlite("libsql.js"), Sqlite("libsql.js.wasm")))] async fn convert_to_int_sqlite_js(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -52,7 +52,7 @@ mod conversion_error { Ok(()) } - #[connector_test(schema(schema_bigint), only(Sqlite), exclude(Sqlite("libsql.js")))] + #[connector_test(schema(schema_bigint), only(Sqlite), exclude(Sqlite("libsql.js"), Sqlite("libsql.js.wasm")))] async fn convert_to_bigint_sqlite_quaint(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -66,7 +66,7 @@ mod conversion_error { Ok(()) } - #[connector_test(schema(schema_bigint), only(Sqlite("libsql.js")))] + #[connector_test(schema(schema_bigint), only(Sqlite("libsql.js"), Sqlite("libsql.js.wasm")))] async fn convert_to_bigint_sqlite_js(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs index cf05a8b9a85a..768c7161c4b0 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs @@ -4,7 +4,7 @@ use query_engine_tests::*; mod not_in_batching { use query_engine_tests::Runner; - #[connector_test(exclude(CockroachDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] + #[connector_test(exclude(CockroachDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm"), Sqlite("libsql.js.wasm")))] async fn not_in_batch_filter(runner: Runner) -> TestResult<()> { runner.query(r#"mutation { createManyTestModel(data: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]) { count }}"#).await?.assert_success(); @@ -22,7 +22,7 @@ mod not_in_batching { mod not_in_batching_cockroachdb { use query_engine_tests::Runner; - #[connector_test(exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] + #[connector_test] async fn not_in_batch_filter(runner: Runner) -> TestResult<()> { runner.query(r#"mutation { createManyTestModel(data: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]) { count }}"#).await?.assert_success(); diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs index b315c1b84720..1bcdb7ce7b5a 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs @@ -88,7 +88,7 @@ mod isb { Ok(()) } - #[connector_test(exclude(MongoDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] + #[connector_test(exclude(MongoDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm"), Sqlite("libsql.js.wasm")))] async fn order_by_aggregation_should_fail(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -103,7 +103,7 @@ mod isb { Ok(()) } - #[connector_test(exclude(MongoDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm")))] + #[connector_test(exclude(MongoDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm"), Sqlite("libsql.js.wasm")))] async fn order_by_relevance_should_fail(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs index 232240175c46..314d3ebb71de 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs @@ -2,7 +2,7 @@ use query_engine_tests::*; #[test_suite( schema(common_nullable_types), - exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm")) + exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm"), Sqlite("libsql.js.wasm")) )] mod bytes { use query_engine_tests::{run_query, EngineProtocol, Runner}; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs index 09cffe23edac..b469fcbb38e6 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs @@ -34,7 +34,7 @@ mod scalar_relations { // TODO: fix https://github.com/prisma/team-orm/issues/684, https://github.com/prisma/team-orm/issues/685 and unexclude DAs #[connector_test( schema(schema_common), - exclude(Postgres("pg.js", "neon.js", "pg.js.wasm", "neon.js.wasm"), Vitess("planetscale.js")) + exclude(Postgres("pg.js", "neon.js", "pg.js.wasm", "neon.js.wasm"), Vitess("planetscale.js"), Sqlite("libsql.js.wasm")) )] async fn common_types(runner: Runner) -> TestResult<()> { create_common_children(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bigint_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bigint_filter.rs index 8230c7e2f04b..88816553094d 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bigint_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bigint_filter.rs @@ -1,7 +1,7 @@ use super::common_test_data; use query_engine_tests::*; -#[test_suite(schema(schemas::common_nullable_types))] +#[test_suite(schema(schemas::common_nullable_types), exclude(Sqlite("libsql.js.wasm")))] mod bigint_filter_spec { use query_engine_tests::run_query; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bytes_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bytes_filter.rs index dd8963dca6e8..30ef2baa002c 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bytes_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bytes_filter.rs @@ -1,7 +1,7 @@ use super::common_test_data; use query_engine_tests::*; -#[test_suite(schema(schemas::common_nullable_types))] +#[test_suite(schema(schemas::common_nullable_types), exclude(Sqlite("libsql.js.wasm")))] mod bytes_filter_spec { use query_engine_tests::run_query; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs index 48035b3d121a..58cacbef0601 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs @@ -6,7 +6,7 @@ mod bigint_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types))] + #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -28,7 +28,7 @@ mod bigint_filter { Ok(()) } - #[connector_test(schema(setup::common_types))] + #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] async fn numeric_comparison_filters(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs index ac5ad3d17c67..48add1c30147 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs @@ -6,7 +6,7 @@ mod bytes_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types))] + #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs index e3f13bdff124..6308f6ea5515 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs @@ -6,7 +6,7 @@ mod datetime_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types))] + #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -28,7 +28,7 @@ mod datetime_filter { Ok(()) } - #[connector_test(schema(setup::common_types))] + #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] async fn numeric_comparison_filters(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs index 580b7f31bc39..d1e6b5c23f49 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs @@ -6,7 +6,7 @@ mod float_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types))] + #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -28,7 +28,7 @@ mod float_filter { Ok(()) } - #[connector_test(schema(setup::common_types))] + #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] async fn numeric_comparison_filters(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs index 7eb29602c642..b66f0387b25f 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs @@ -6,7 +6,7 @@ mod int_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types))] + #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -28,7 +28,7 @@ mod int_filter { Ok(()) } - #[connector_test(schema(setup::common_types))] + #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] async fn numeric_comparison_filters(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs index 787f9642c4a2..db1041d9a23c 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs @@ -6,7 +6,7 @@ mod string_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test] + #[connector_test(exclude(Sqlite("libsql.js.wasm")))] async fn basic_where_sensitive(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -50,7 +50,7 @@ mod string_filter { Ok(()) } - #[connector_test] + #[connector_test(exclude(Sqlite("libsql.js.wasm")))] async fn numeric_comparison_filters_sensitive(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -225,7 +225,7 @@ mod string_filter { Ok(()) } - #[connector_test] + #[connector_test(exclude(Sqlite("libsql.js.wasm")))] async fn string_comparison_filters_sensitive(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; run_query!( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs index 349fa121e3a7..ab7d519429bc 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs @@ -5,7 +5,7 @@ mod input_coercion { use query_engine_tests::fmt_execute_raw; // Checks that query raw inputs are coerced to the correct types - #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] + #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")))] async fn scalar_input_correctly_coerced(runner: Runner) -> TestResult<()> { run_query!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs index ea10f5da0905..952ae7c50d3d 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs @@ -5,7 +5,7 @@ use query_engine_tests::*; mod null_list { use query_engine_tests::{fmt_query_raw, run_query, run_query_pretty}; - #[connector_test(schema(common_list_types), exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] + #[connector_test(schema(common_list_types), exclude(Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")))] async fn null_scalar_lists(runner: Runner) -> TestResult<()> { run_query!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/typed_output.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/typed_output.rs index f49433ef745f..8434da64073e 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/typed_output.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/typed_output.rs @@ -483,7 +483,7 @@ mod typed_output { schema.to_owned() } - #[connector_test(schema(schema_sqlite), only(Sqlite))] + #[connector_test(schema(schema_sqlite), only(Sqlite), exclude(Sqlite("libsql.js.wasm")))] async fn all_scalars_sqlite(runner: Runner) -> TestResult<()> { create_row( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs index 13b941fc8071..eceef98beafa 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs @@ -17,7 +17,7 @@ mod bigint { } // "Using a BigInt field" should "work" - #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] + #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")))] async fn using_bigint_field(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs index e5c0bc3a1e7a..013a26114b94 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs @@ -31,7 +31,7 @@ mod bytes { } // "Using a bytes field" should "work" - #[connector_test(schema(basic))] + #[connector_test(schema(basic), exclude(Sqlite("libsql.js.wasm")))] async fn using_bytes_field(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { @@ -79,7 +79,7 @@ mod bytes { #[connector_test( schema(bytes_id), - exclude(MySQL, Vitess, SqlServer, Postgres("pg.js.wasm", "neon.js.wasm")) + exclude(MySQL, Vitess, SqlServer, Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")) )] async fn byte_id_coercion(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs index d87f326b2119..2a83d17f6fb7 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs @@ -23,7 +23,7 @@ mod postgres { } //"Postgres native int types" should "work" - #[connector_test(schema(schema_int), exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] + #[connector_test(schema(schema_int), only(Postgres), exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] async fn native_int_types(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { From 4e1dc8e5188d27bdfccd06085fd23b0c9dccea49 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 15:31:24 +0100 Subject: [PATCH 07/18] Fix vitess version parsing --- .../query-tests-setup/src/connector_tag/mod.rs | 2 +- .../query-tests-setup/src/connector_tag/vitess.rs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/mod.rs b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/mod.rs index 5269cd061da2..5a0dff3b49a2 100644 --- a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/mod.rs +++ b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/mod.rs @@ -207,7 +207,7 @@ pub(crate) fn connection_string( } ConnectorVersion::Vitess(Some(VitessVersion::V8_0)) => "mysql://root@localhost:33807/test".into(), - ConnectorVersion::Vitess(Some(VitessVersion::PlanetscaleJs)) => { + ConnectorVersion::Vitess(Some(VitessVersion::PlanetscaleJsNapi | VitessVersion::PlanetscaleJsWasm)) => { format!("mysql://root@127.0.0.1:3310/{database}") } diff --git a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/vitess.rs b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/vitess.rs index ce827927b403..ba0f4249cd7c 100644 --- a/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/vitess.rs +++ b/query-engine/connector-test-kit-rs/query-tests-setup/src/connector_tag/vitess.rs @@ -34,7 +34,8 @@ impl ConnectorTagInterface for VitessConnectorTag { #[derive(Debug, Clone, Copy, PartialEq)] pub enum VitessVersion { V8_0, - PlanetscaleJs, + PlanetscaleJsNapi, + PlanetscaleJsWasm, } impl FromStr for VitessVersion { @@ -43,7 +44,8 @@ impl FromStr for VitessVersion { fn from_str(s: &str) -> Result { let version = match s { "8.0" => Self::V8_0, - "planetscale.js" => Self::PlanetscaleJs, + "planetscale.js" => Self::PlanetscaleJsNapi, + "planetscale.js.wasm" => Self::PlanetscaleJsWasm, _ => return Err(TestError::parse_error(format!("Unknown Vitess version `{s}`"))), }; @@ -55,7 +57,8 @@ impl Display for VitessVersion { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::V8_0 => write!(f, "8.0"), - Self::PlanetscaleJs => write!(f, "planetscale.js"), + Self::PlanetscaleJsNapi => write!(f, "planetscale.js"), + Self::PlanetscaleJsWasm => write!(f, "planetscale.js.wasm"), } } } From eb53e8b757e248a60e8f7901f5b008598a335934 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 16:34:01 +0100 Subject: [PATCH 08/18] Skip wasm planetscale tests that are also skipped for napi --- .../tests/new/interactive_tx.rs | 6 +-- .../query-engine-tests/tests/new/metrics.rs | 2 +- .../tests/new/multi_schema.rs | 5 ++- .../query-engine-tests/tests/new/occ.rs | 12 ++++-- .../new/ref_actions/on_delete/set_default.rs | 40 +++++++++++++++---- .../tests/new/regressions/prisma_15204.rs | 12 +++++- .../tests/new/regressions/prisma_17103.rs | 2 +- .../tests/new/regressions/prisma_7434.rs | 7 +++- .../tests/queries/aggregation/avg.rs | 4 +- .../queries/aggregation/combination_spec.rs | 4 +- .../tests/queries/aggregation/count.rs | 2 +- .../tests/queries/aggregation/max.rs | 4 +- .../tests/queries/aggregation/min.rs | 4 +- .../tests/queries/aggregation/sum.rs | 4 +- .../queries/batch/transactional_batch.rs | 6 +-- .../queries/data_types/through_relation.rs | 6 ++- .../filters/field_reference/json_filter.rs | 4 +- .../tests/queries/filters/json.rs | 2 +- .../tests/queries/filters/json_filters.rs | 14 +++---- .../tests/queries/filters/search_filter.rs | 2 +- .../order_and_pagination/nested_pagination.rs | 6 +-- .../order_by_dependent.rs | 4 +- .../order_by_dependent_pagination.rs | 6 +-- .../order_and_pagination/pagination.rs | 6 +-- .../tests/raw/sql/null_list.rs | 5 ++- .../tests/writes/data_types/bytes.rs | 8 +++- .../tests/writes/ids/byoid.rs | 8 ++-- .../nested_update_many_inside_update.rs | 14 +++---- .../nested_create_many.rs | 2 +- .../compound_fks_mixed_requiredness.rs | 2 +- .../writes/top_level_mutations/create.rs | 2 +- .../writes/top_level_mutations/create_many.rs | 2 +- .../writes/top_level_mutations/update_many.rs | 4 +- .../writes/top_level_mutations/upsert.rs | 2 +- 34 files changed, 136 insertions(+), 77 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/interactive_tx.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/interactive_tx.rs index 33908a9e079e..4372b23c282d 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/interactive_tx.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/interactive_tx.rs @@ -1,7 +1,7 @@ use query_engine_tests::test_suite; use std::borrow::Cow; -#[test_suite(schema(generic), exclude(Vitess("planetscale.js")))] +#[test_suite(schema(generic), exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] mod interactive_tx { use query_engine_tests::*; use tokio::time; @@ -573,7 +573,7 @@ mod itx_isolation { use query_engine_tests::*; // All (SQL) connectors support serializable. - #[connector_test(exclude(MongoDb, Vitess("planetscale.js")))] + #[connector_test(exclude(MongoDb, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn basic_serializable(mut runner: Runner) -> TestResult<()> { let tx_id = runner.start_tx(5000, 5000, Some("Serializable".to_owned())).await?; runner.set_active_tx(tx_id.clone()); @@ -595,7 +595,7 @@ mod itx_isolation { Ok(()) } - #[connector_test(exclude(MongoDb, Vitess("planetscale.js")))] + #[connector_test(exclude(MongoDb, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn casing_doesnt_matter(mut runner: Runner) -> TestResult<()> { let tx_id = runner.start_tx(5000, 5000, Some("sErIaLiZaBlE".to_owned())).await?; runner.set_active_tx(tx_id.clone()); diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs index 4e9edf0adc3f..dff1ecdb03a5 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/metrics.rs @@ -3,7 +3,7 @@ use query_engine_tests::test_suite; #[test_suite( schema(generic), exclude( - Vitess("planetscale.js"), + Vitess("planetscale.js", "planetscale.js.wasm"), Postgres("neon.js", "pg.js", "neon.js.wasm", "pg.js.wasm"), Sqlite("libsql.js", "libsql.js.wasm") ) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/multi_schema.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/multi_schema.rs index 29c93689f542..40f646277f2c 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/multi_schema.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/multi_schema.rs @@ -1,6 +1,9 @@ use query_engine_tests::test_suite; -#[test_suite(capabilities(MultiSchema), exclude(Mysql, Vitess("planetscale.js")))] +#[test_suite( + capabilities(MultiSchema), + exclude(Mysql, Vitess("planetscale.js", "planetscale.js.wasm")) +)] mod multi_schema { use query_engine_tests::*; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/occ.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/occ.rs index b495c8627e5a..d074a223531e 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/occ.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/occ.rs @@ -112,7 +112,10 @@ mod occ { assert_eq!(booked_user_id, found_booked_user_id); } - #[connector_test(schema(occ_simple), exclude(MongoDB, CockroachDb, Vitess("planetscale.js")))] + #[connector_test( + schema(occ_simple), + exclude(MongoDB, CockroachDb, Vitess("planetscale.js", "planetscale.js.wasm")) + )] async fn occ_update_many_test(runner: Runner) -> TestResult<()> { let runner = Arc::new(runner); @@ -127,7 +130,10 @@ mod occ { Ok(()) } - #[connector_test(schema(occ_simple), exclude(CockroachDb, Vitess("planetscale.js")))] + #[connector_test( + schema(occ_simple), + exclude(CockroachDb, Vitess("planetscale.js", "planetscale.js.wasm")) + )] async fn occ_update_test(runner: Runner) -> TestResult<()> { let runner = Arc::new(runner); @@ -158,7 +164,7 @@ mod occ { Ok(()) } - #[connector_test(schema(occ_simple), exclude(Vitess("planetscale.js")))] + #[connector_test(schema(occ_simple), exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn occ_delete_test(runner: Runner) -> TestResult<()> { let runner = Arc::new(runner); diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/ref_actions/on_delete/set_default.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/ref_actions/on_delete/set_default.rs index 40ef54ed11f1..d96c3d3576ff 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/ref_actions/on_delete/set_default.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/ref_actions/on_delete/set_default.rs @@ -2,7 +2,10 @@ use indoc::indoc; use query_engine_tests::*; -#[test_suite(suite = "setdefault_onD_1to1_req", exclude(MongoDb, MySQL, Vitess("planetscale.js")))] +#[test_suite( + suite = "setdefault_onD_1to1_req", + exclude(MongoDb, MySQL, Vitess("planetscale.js", "planetscale.js.wasm")) +)] mod one2one_req { fn required_with_default() -> String { let schema = indoc! { @@ -66,7 +69,10 @@ mod one2one_req { } /// Deleting the parent reconnects the child to the default and fails (the default doesn't exist). - #[connector_test(schema(required_with_default), exclude(MongoDb, MySQL, Vitess("planetscale.js")))] + #[connector_test( + schema(required_with_default), + exclude(MongoDb, MySQL, Vitess("planetscale.js", "planetscale.js.wasm")) + )] async fn delete_parent_no_exist_fail(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { createOneParent(data: { id: 1, child: { create: { id: 1 }}}) { id }}"#), @@ -103,7 +109,10 @@ mod one2one_req { } } -#[test_suite(suite = "setdefault_onD_1to1_opt", exclude(MongoDb, MySQL, Vitess("planetscale.js")))] +#[test_suite( + suite = "setdefault_onD_1to1_opt", + exclude(MongoDb, MySQL, Vitess("planetscale.js", "planetscale.js.wasm")) +)] mod one2one_opt { fn optional_with_default() -> String { let schema = indoc! { @@ -167,7 +176,10 @@ mod one2one_opt { } /// Deleting the parent reconnects the child to the default and fails (the default doesn't exist). - #[connector_test(schema(optional_with_default), exclude(MongoDb, MySQL, Vitess("planetscale.js")))] + #[connector_test( + schema(optional_with_default), + exclude(MongoDb, MySQL, Vitess("planetscale.js", "planetscale.js.wasm")) + )] async fn delete_parent_no_exist_fail(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { createOneParent(data: { id: 1, child: { create: { id: 1 }}}) { id }}"#), @@ -206,7 +218,10 @@ mod one2one_opt { } } -#[test_suite(suite = "setdefault_onD_1toM_req", exclude(MongoDb, MySQL, Vitess("planetscale.js")))] +#[test_suite( + suite = "setdefault_onD_1toM_req", + exclude(MongoDb, MySQL, Vitess("planetscale.js", "planetscale.js.wasm")) +)] mod one2many_req { fn required_with_default() -> String { let schema = indoc! { @@ -270,7 +285,10 @@ mod one2many_req { } /// Deleting the parent reconnects the child to the default and fails (the default doesn't exist). - #[connector_test(schema(required_with_default), exclude(MongoDb, MySQL, Vitess("planetscale.js")))] + #[connector_test( + schema(required_with_default), + exclude(MongoDb, MySQL, Vitess("planetscale.js", "planetscale.js.wasm")) + )] async fn delete_parent_no_exist_fail(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { createOneParent(data: { id: 1, children: { create: { id: 1 }}}) { id }}"#), @@ -307,7 +325,10 @@ mod one2many_req { } } -#[test_suite(suite = "setdefault_onD_1toM_opt", exclude(MongoDb, MySQL, Vitess("planetscale.js")))] +#[test_suite( + suite = "setdefault_onD_1toM_opt", + exclude(MongoDb, MySQL, Vitess("planetscale.js", "planetscale.js.wasm")) +)] mod one2many_opt { fn optional_with_default() -> String { let schema = indoc! { @@ -371,7 +392,10 @@ mod one2many_opt { } /// Deleting the parent reconnects the child to the default and fails (the default doesn't exist). - #[connector_test(schema(optional_with_default), exclude(MongoDb, MySQL, Vitess("planetscale.js")))] + #[connector_test( + schema(optional_with_default), + exclude(MongoDb, MySQL, Vitess("planetscale.js", "planetscale.js.wasm")) + )] async fn delete_parent_no_exist_fail(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { createOneParent(data: { id: 1, children: { create: { id: 1 }}}) { id }}"#), diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_15204.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_15204.rs index 73ae4322db6b..9f4ccdcb3b11 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_15204.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_15204.rs @@ -24,7 +24,11 @@ mod conversion_error { schema.to_owned() } - #[connector_test(schema(schema_int), only(Sqlite), exclude(Sqlite("libsql.js"), Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(schema_int), + only(Sqlite), + exclude(Sqlite("libsql.js"), Sqlite("libsql.js.wasm")) + )] async fn convert_to_int_sqlite_quaint(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -52,7 +56,11 @@ mod conversion_error { Ok(()) } - #[connector_test(schema(schema_bigint), only(Sqlite), exclude(Sqlite("libsql.js"), Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(schema_bigint), + only(Sqlite), + exclude(Sqlite("libsql.js"), Sqlite("libsql.js.wasm")) + )] async fn convert_to_bigint_sqlite_quaint(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_17103.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_17103.rs index c9065ec54c58..8168b66a3a0f 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_17103.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_17103.rs @@ -21,7 +21,7 @@ mod prisma_17103 { schema.to_owned() } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn regression(runner: Runner) -> TestResult<()> { run_query!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs index 768c7161c4b0..1d96b570d539 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs @@ -4,7 +4,12 @@ use query_engine_tests::*; mod not_in_batching { use query_engine_tests::Runner; - #[connector_test(exclude(CockroachDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm"), Sqlite("libsql.js.wasm")))] + #[connector_test(exclude( + CockroachDb, + Postgres("pg.js.wasm"), + Postgres("neon.js.wasm"), + Sqlite("libsql.js.wasm") + ))] async fn not_in_batch_filter(runner: Runner) -> TestResult<()> { runner.query(r#"mutation { createManyTestModel(data: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]) { count }}"#).await?.assert_success(); diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/avg.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/avg.rs index 4793fa24ae2a..387d05dc5e21 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/avg.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/avg.rs @@ -33,7 +33,7 @@ mod aggregation_avg { Ok(()) } - #[connector_test(exclude(MongoDb, Vitess("planetscale.js")))] + #[connector_test(exclude(MongoDb, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn avg_with_all_sorts_of_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, float: 5.5, int: 5, bInt: "5" }"#).await?; create_row(&runner, r#"{ id: 2, float: 4.5, int: 10, bInt: "10" }"#).await?; @@ -126,7 +126,7 @@ mod decimal_aggregation_avg { Ok(()) } - #[connector_test(exclude(MongoDb, Vitess("planetscale.js")))] + #[connector_test(exclude(MongoDb, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn avg_with_all_sorts_of_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, decimal: "5.5" }"#).await?; create_row(&runner, r#"{ id: 2, decimal: "4.5" }"#).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/combination_spec.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/combination_spec.rs index 3c1f1b092690..e7116894cffe 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/combination_spec.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/combination_spec.rs @@ -87,7 +87,7 @@ mod combinations { } // Mongo precision issue. - #[connector_test(exclude(MongoDB, Vitess("planetscale.js")))] + #[connector_test(exclude(MongoDB, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn with_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: "1", float: 5.5, int: 5 }"#).await?; create_row(&runner, r#"{ id: "2", float: 4.5, int: 10 }"#).await?; @@ -369,7 +369,7 @@ mod decimal_combinations { } // Mongo precision issue. - #[connector_test(exclude(MongoDB, Vitess("planetscale.js")))] + #[connector_test(exclude(MongoDB, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn with_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: "1", dec: "5.5" }"#).await?; create_row(&runner, r#"{ id: "2", dec: "4.5" }"#).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/count.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/count.rs index 78ab88fd59c6..043419a58b2d 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/count.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/count.rs @@ -27,7 +27,7 @@ mod aggregation_count { Ok(()) } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn count_with_all_sorts_of_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, string: "1" }"#).await?; create_row(&runner, r#"{ id: 2, string: "2" }"#).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/max.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/max.rs index 12f9b6861892..9c6c055e939d 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/max.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/max.rs @@ -30,7 +30,7 @@ mod aggregation_max { Ok(()) } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn max_with_all_sorts_of_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, float: 5.5, int: 5, bInt: "5", string: "2" }"#).await?; create_row(&runner, r#"{ id: 2, float: 4.5, int: 10, bInt: "10", string: "f" }"#).await?; @@ -120,7 +120,7 @@ mod decimal_aggregation_max { Ok(()) } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn max_with_all_sorts_of_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, decimal: "5.5" }"#).await?; create_row(&runner, r#"{ id: 2, decimal: "4.5" }"#).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/min.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/min.rs index 332a5e10707f..c5ce60653d8f 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/min.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/min.rs @@ -30,7 +30,7 @@ mod aggregation_min { Ok(()) } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn min_with_all_sorts_of_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, float: 5.5, int: 5, bInt: "5", string: "2" }"#).await?; create_row(&runner, r#"{ id: 2, float: 4.5, int: 10, bInt: "10", string: "f" }"#).await?; @@ -120,7 +120,7 @@ mod decimal_aggregation_min { Ok(()) } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn min_with_all_sorts_of_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, decimal: "5.5" }"#).await?; create_row(&runner, r#"{ id: 2, decimal: "4.5" }"#).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/sum.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/sum.rs index 14d194a1a4f4..b713d216edb7 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/sum.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/aggregation/sum.rs @@ -30,7 +30,7 @@ mod aggregation_sum { Ok(()) } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn sum_with_all_sorts_of_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, float: 5.5, int: 5, bInt: "5" }"#).await?; create_row(&runner, r#"{ id: 2, float: 4.5, int: 10, bInt: "10" }"#).await?; @@ -120,7 +120,7 @@ mod decimal_aggregation_sum { Ok(()) } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn sum_with_all_sorts_of_query_args(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, decimal: "5.5" }"#).await?; create_row(&runner, r#"{ id: 2, decimal: "4.5" }"#).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/transactional_batch.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/transactional_batch.rs index 2c332f95f29a..f4ad29cf0584 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/transactional_batch.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/transactional_batch.rs @@ -44,7 +44,7 @@ mod transactional { Ok(()) } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn one_success_one_fail(runner: Runner) -> TestResult<()> { let queries = vec![ r#"mutation { createOneModelA(data: { id: 1 }) { id }}"#.to_string(), @@ -77,7 +77,7 @@ mod transactional { Ok(()) } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn one_query(runner: Runner) -> TestResult<()> { // Existing ModelA in the DB will prevent the nested ModelA creation in the batch. insta::assert_snapshot!( @@ -104,7 +104,7 @@ mod transactional { Ok(()) } - #[connector_test(exclude(MongoDb, Vitess("planetscale.js")))] + #[connector_test(exclude(MongoDb, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn valid_isolation_level(runner: Runner) -> TestResult<()> { let queries = vec![r#"mutation { createOneModelB(data: { id: 1 }) { id }}"#.to_string()]; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs index b469fcbb38e6..8baceb69e98b 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/through_relation.rs @@ -34,7 +34,11 @@ mod scalar_relations { // TODO: fix https://github.com/prisma/team-orm/issues/684, https://github.com/prisma/team-orm/issues/685 and unexclude DAs #[connector_test( schema(schema_common), - exclude(Postgres("pg.js", "neon.js", "pg.js.wasm", "neon.js.wasm"), Vitess("planetscale.js"), Sqlite("libsql.js.wasm")) + exclude( + Postgres("pg.js", "neon.js", "pg.js.wasm", "neon.js.wasm"), + Vitess("planetscale.js", "planetscale.js.wasm"), + Sqlite("libsql.js.wasm") + ) )] async fn common_types(runner: Runner) -> TestResult<()> { create_common_children(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/json_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/json_filter.rs index b865731161c2..2666e8c80900 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/json_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/json_filter.rs @@ -126,7 +126,7 @@ mod json_filter { Ok(()) } - #[connector_test(schema(schema), exclude(MySQL(5.6), Vitess("planetscale.js")))] + #[connector_test(schema(schema), exclude(MySQL(5.6), Vitess("planetscale.js", "planetscale.js.wasm")))] async fn string_comparison_filters(runner: Runner) -> TestResult<()> { test_string_data(&runner).await?; @@ -169,7 +169,7 @@ mod json_filter { Ok(()) } - #[connector_test(schema(schema), exclude(MySQL(5.6), Vitess("planetscale.js")))] + #[connector_test(schema(schema), exclude(MySQL(5.6), Vitess("planetscale.js", "planetscale.js.wasm")))] async fn array_comparison_filters(runner: Runner) -> TestResult<()> { test_array_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json.rs index e4d160a9bae9..ca8cc885798a 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json.rs @@ -212,7 +212,7 @@ mod json { #[connector_test( schema(json_opt), exclude( - Vitess("planetscale.js"), + Vitess("planetscale.js", "planetscale.js.wasm"), Postgres("neon.js", "pg.js", "neon.js.wasm", "pg.js.wasm"), Sqlite("libsql.js"), MySQL(5.6) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json_filters.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json_filters.rs index f3e4026a8678..a1a3072e242c 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json_filters.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/json_filters.rs @@ -27,7 +27,7 @@ mod json_filters { schema.to_owned() } - #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js")))] + #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js", "planetscale.js.wasm")))] async fn no_path_without_filter(runner: Runner) -> TestResult<()> { assert_error!( runner, @@ -280,7 +280,7 @@ mod json_filters { Ok(()) } - #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js")))] + #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js", "planetscale.js.wasm")))] async fn array_contains(runner: Runner) -> TestResult<()> { array_contains_runner(runner).await?; @@ -389,7 +389,7 @@ mod json_filters { Ok(()) } - #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js")))] + #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js", "planetscale.js.wasm")))] async fn array_starts_with(runner: Runner) -> TestResult<()> { array_starts_with_runner(runner).await?; @@ -496,7 +496,7 @@ mod json_filters { Ok(()) } - #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js")))] + #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js", "planetscale.js.wasm")))] async fn array_ends_with(runner: Runner) -> TestResult<()> { array_ends_with_runner(runner).await?; @@ -535,7 +535,7 @@ mod json_filters { Ok(()) } - #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js")))] + #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js", "planetscale.js.wasm")))] async fn string_contains(runner: Runner) -> TestResult<()> { string_contains_runner(runner).await?; @@ -575,7 +575,7 @@ mod json_filters { Ok(()) } - #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js")))] + #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js", "planetscale.js.wasm")))] async fn string_starts_with(runner: Runner) -> TestResult<()> { string_starts_with_runner(runner).await?; @@ -614,7 +614,7 @@ mod json_filters { Ok(()) } - #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js")))] + #[connector_test(exclude(MySQL(5.6), Vitess("planetscale.js", "planetscale.js.wasm")))] async fn string_ends_with(runner: Runner) -> TestResult<()> { string_ends_with_runner(runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/search_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/search_filter.rs index 51637d3bbcb8..abf7f04efdf3 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/search_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/search_filter.rs @@ -229,7 +229,7 @@ mod search_filter_with_index { super::ensure_filter_tree_shake_works(runner).await } - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn throws_error_on_missing_index(runner: Runner) -> TestResult<()> { super::create_test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/nested_pagination.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/nested_pagination.rs index 6a67b87d56b1..34af3fc21ed9 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/nested_pagination.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/nested_pagination.rs @@ -80,7 +80,7 @@ mod nested_pagination { ***************/ // should skip the first item - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn mid_lvl_skip_1(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -102,7 +102,7 @@ mod nested_pagination { } // should "skip all items" - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn mid_lvl_skip_3(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -124,7 +124,7 @@ mod nested_pagination { } // should "skip all items" - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn mid_lvl_skip_4(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/order_by_dependent.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/order_by_dependent.rs index c8f7429451a7..d12f7fcfed65 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/order_by_dependent.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/order_by_dependent.rs @@ -223,7 +223,7 @@ mod order_by_dependent { } // "[Circular with differing records] Ordering by related record field ascending" should "work" - #[connector_test(exclude(SqlServer, Vitess("planetscale.js")))] + #[connector_test(exclude(SqlServer, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn circular_diff_related_record_asc(runner: Runner) -> TestResult<()> { // Records form circles with their relations create_row(&runner, 1, Some(1), Some(1), Some(3)).await?; @@ -258,7 +258,7 @@ mod order_by_dependent { } // "[Circular with differing records] Ordering by related record field descending" should "work" - #[connector_test(exclude(SqlServer, Vitess("planetscale.js")))] + #[connector_test(exclude(SqlServer, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn circular_diff_related_record_desc(runner: Runner) -> TestResult<()> { // Records form circles with their relations create_row(&runner, 1, Some(1), Some(1), Some(3)).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/order_by_dependent_pagination.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/order_by_dependent_pagination.rs index f8e5e831971b..323192be180d 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/order_by_dependent_pagination.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/order_by_dependent_pagination.rs @@ -79,7 +79,7 @@ mod order_by_dependent_pag { // "[Hops: 1] Ordering by related record field ascending with nulls" should "work" // TODO(julius): should enable for SQL Server when partial indices are in the PSL - #[connector_test(exclude(SqlServer, Vitess("planetscale.js")))] + #[connector_test(exclude(SqlServer, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn hop_1_related_record_asc_nulls(runner: Runner) -> TestResult<()> { // 1 record has the "full chain", one half, one none create_row(&runner, 1, Some(1), Some(1), None).await?; @@ -146,7 +146,7 @@ mod order_by_dependent_pag { // "[Hops: 2] Ordering by related record field ascending with nulls" should "work" // TODO(garren): should enable for SQL Server when partial indices are in the PSL - #[connector_test(exclude(SqlServer, Vitess("planetscale.js")))] + #[connector_test(exclude(SqlServer, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn hop_2_related_record_asc_null(runner: Runner) -> TestResult<()> { // 1 record has the "full chain", one half, one none create_row(&runner, 1, Some(1), Some(1), None).await?; @@ -227,7 +227,7 @@ mod order_by_dependent_pag { // "[Circular with differing records] Ordering by related record field ascending" should "work" // TODO(julius): should enable for SQL Server when partial indices are in the PSL - #[connector_test(exclude(SqlServer, Vitess("planetscale.js")))] + #[connector_test(exclude(SqlServer, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn circular_diff_related_record_asc(runner: Runner) -> TestResult<()> { // Records form circles with their relations create_row(&runner, 1, Some(1), Some(1), Some(3)).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/pagination.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/pagination.rs index 83c472a064e7..e6cbee21d9b7 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/pagination.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/order_and_pagination/pagination.rs @@ -277,7 +277,7 @@ mod pagination { ********************/ // "A skip" should "return all records after the offset specified" - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn skip_returns_all_after_offset(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -296,7 +296,7 @@ mod pagination { } // "A skip with order reversed" should "return all records after the offset specified" - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn skip_reversed_order(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -315,7 +315,7 @@ mod pagination { } // "A skipping beyond all records" should "return no records" - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn skipping_beyond_all_records(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs index 952ae7c50d3d..7ff845c1df56 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs @@ -5,7 +5,10 @@ use query_engine_tests::*; mod null_list { use query_engine_tests::{fmt_query_raw, run_query, run_query_pretty}; - #[connector_test(schema(common_list_types), exclude(Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(common_list_types), + exclude(Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")) + )] async fn null_scalar_lists(runner: Runner) -> TestResult<()> { run_query!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs index 013a26114b94..a39221655d2f 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs @@ -79,7 +79,13 @@ mod bytes { #[connector_test( schema(bytes_id), - exclude(MySQL, Vitess, SqlServer, Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")) + exclude( + MySQL, + Vitess, + SqlServer, + Postgres("pg.js.wasm", "neon.js.wasm"), + Sqlite("libsql.js.wasm") + ) )] async fn byte_id_coercion(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/ids/byoid.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/ids/byoid.rs index 5493ff7f2778..5d46b75a98fa 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/ids/byoid.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/ids/byoid.rs @@ -48,7 +48,7 @@ mod byoid { #[connector_test( schema(schema_1), only(MySql, Postgres, Sqlite, Vitess), - exclude(Vitess("planetscale.js")) + exclude(Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn create_and_return_item_woi_1(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( @@ -80,7 +80,7 @@ mod byoid { #[connector_test( schema(schema_2), only(MySql, Postgres, Sqlite, Vitess), - exclude(Vitess("planetscale.js")) + exclude(Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn create_and_return_item_woi_2(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( @@ -142,7 +142,7 @@ mod byoid { #[connector_test( schema(schema_1), only(MySql, Postgres, Sqlite, Vitess), - exclude(Vitess("planetscale.js")) + exclude(Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn nested_create_return_item_woi_1(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( @@ -174,7 +174,7 @@ mod byoid { #[connector_test( schema(schema_2), only(MySql, Postgres, Sqlite, Vitess), - exclude(Vitess("planetscale.js")) + exclude(Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn nested_create_return_item_woi_2(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/nested_mutations/already_converted/nested_update_many_inside_update.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/nested_mutations/already_converted/nested_update_many_inside_update.rs index 05931d16084b..c6b48405f8c9 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/nested_mutations/already_converted/nested_update_many_inside_update.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/nested_mutations/already_converted/nested_update_many_inside_update.rs @@ -59,7 +59,7 @@ mod um_inside_update { #[relation_link_test( on_parent = "ToMany", on_child = "ToOneReq", - exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js")) + exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn pm_c1_req_should_work(runner: &Runner, t: &DatamodelWithParams) -> TestResult<()> { let parent = setup_data(runner, t).await?; @@ -98,7 +98,7 @@ mod um_inside_update { #[relation_link_test( on_parent = "ToMany", on_child = "ToOneOpt", - exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js")) + exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn pm_c1_should_work(runner: &Runner, t: &DatamodelWithParams) -> TestResult<()> { let parent = setup_data(runner, t).await?; @@ -137,7 +137,7 @@ mod um_inside_update { #[relation_link_test( on_parent = "ToMany", on_child = "ToMany", - exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js")) + exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn pm_cm_should_work(runner: &Runner, t: &DatamodelWithParams) -> TestResult<()> { let parent = setup_data(runner, t).await?; @@ -176,7 +176,7 @@ mod um_inside_update { #[relation_link_test( on_parent = "ToMany", on_child = "ToOneReq", - exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js")) + exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn pm_c1_req_many_ums(runner: &Runner, t: &DatamodelWithParams) -> TestResult<()> { let parent = setup_data(runner, t).await?; @@ -221,7 +221,7 @@ mod um_inside_update { #[relation_link_test( on_parent = "ToMany", on_child = "ToOneReq", - exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js")) + exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn pm_c1_req_empty_filter(runner: &Runner, t: &DatamodelWithParams) -> TestResult<()> { let parent = setup_data(runner, t).await?; @@ -262,7 +262,7 @@ mod um_inside_update { #[relation_link_test( on_parent = "ToMany", on_child = "ToOneReq", - exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js")) + exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn pm_c1_req_noop_no_hit(runner: &Runner, t: &DatamodelWithParams) -> TestResult<()> { let parent = setup_data(runner, t).await?; @@ -309,7 +309,7 @@ mod um_inside_update { #[relation_link_test( on_parent = "ToMany", on_child = "ToOneReq", - exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js")) + exclude(Postgres("pg.js", "neon.js"), Vitess("planetscale.js", "planetscale.js.wasm")) )] async fn pm_c1_req_many_filters(runner: &Runner, t: &DatamodelWithParams) -> TestResult<()> { let parent = setup_data(runner, t).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/nested_mutations/not_using_schema_base/nested_create_many.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/nested_mutations/not_using_schema_base/nested_create_many.rs index 45562b5f6be8..cd71df429ea3 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/nested_mutations/not_using_schema_base/nested_create_many.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/nested_mutations/not_using_schema_base/nested_create_many.rs @@ -78,7 +78,7 @@ mod nested_create_many { // "Nested createMany" should "error on duplicates by default" // TODO(dom): Not working for mongo - #[connector_test(exclude(Sqlite, MongoDb, Vitess("planetscale.js")))] + #[connector_test(exclude(Sqlite, MongoDb, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn nested_createmany_fail_dups(runner: Runner) -> TestResult<()> { assert_error!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/relations/compound_fks_mixed_requiredness.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/relations/compound_fks_mixed_requiredness.rs index 808af82deec4..8f91a6039de4 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/relations/compound_fks_mixed_requiredness.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/relations/compound_fks_mixed_requiredness.rs @@ -26,7 +26,7 @@ mod compound_fks { } // "A One to Many relation with mixed requiredness" should "be writable and readable" - #[connector_test(exclude(MySql(5.6), MongoDb, Vitess("planetscale.js")))] + #[connector_test(exclude(MySql(5.6), MongoDb, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn one2m_mix_required_writable_readable(runner: Runner) -> TestResult<()> { // Setup user insta::assert_snapshot!( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/create.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/create.rs index 1507ea0c082b..5c91f1c7f18a 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/create.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/create.rs @@ -205,7 +205,7 @@ mod create { // TODO(dom): Not working on mongo // TODO(dom): 'Expected result to return an error, but found success: {"data":{"createOneScalarModel":{"optUnique":"test"}}}' // Comment(dom): Expected, we're not enforcing uniqueness for the test setup yet. - #[connector_test(exclude(MongoDb, Vitess("planetscale.js")))] + #[connector_test(exclude(MongoDb, Vitess("planetscale.js", "planetscale.js.wasm")))] async fn gracefully_fails_when_uniq_violation(runner: Runner) -> TestResult<()> { run_query!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/create_many.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/create_many.rs index 94118b669c1b..832205e66c60 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/create_many.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/create_many.rs @@ -165,7 +165,7 @@ mod create_many { } // "createMany" should "error on duplicates by default" - #[connector_test(schema(schema_4), exclude(Vitess("planetscale.js")))] + #[connector_test(schema(schema_4), exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn create_many_error_dups(runner: Runner) -> TestResult<()> { assert_error!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/update_many.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/update_many.rs index 749048fd3edc..80c59a1a65f4 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/update_many.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/update_many.rs @@ -123,7 +123,7 @@ mod update_many { } // "An updateMany mutation" should "correctly apply all number operations for Int" - #[connector_test(exclude(Vitess("planetscale.js"), CockroachDb))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm"), CockroachDb))] async fn apply_number_ops_for_int(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, optStr: "str1" }"#).await?; create_row(&runner, r#"{ id: 2, optStr: "str2", optInt: 2 }"#).await?; @@ -240,7 +240,7 @@ mod update_many { } // "An updateMany mutation" should "correctly apply all number operations for Float" - #[connector_test(exclude(Vitess("planetscale.js")))] + #[connector_test(exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn apply_number_ops_for_float(runner: Runner) -> TestResult<()> { create_row(&runner, r#"{ id: 1, optStr: "str1" }"#).await?; create_row(&runner, r#"{ id: 2, optStr: "str2", optFloat: 2 }"#).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/upsert.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/upsert.rs index f4f43eda05ac..e876bac06211 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/upsert.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/top_level_mutations/upsert.rs @@ -674,7 +674,7 @@ mod upsert { Ok(()) } - #[connector_test(schema(generic), exclude(Vitess("planetscale.js")))] + #[connector_test(schema(generic), exclude(Vitess("planetscale.js", "planetscale.js.wasm")))] async fn upsert_fails_if_filter_dont_match(runner: Runner) -> TestResult<()> { run_query!( &runner, From b351157109298f11d5051c00603a93d073781219 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 17:14:25 +0100 Subject: [PATCH 09/18] Rename jobs --- .../test-query-engine-driver-adapters.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-query-engine-driver-adapters.yml b/.github/workflows/test-query-engine-driver-adapters.yml index 08bd3b192eac..682ce20cdd1a 100644 --- a/.github/workflows/test-query-engine-driver-adapters.yml +++ b/.github/workflows/test-query-engine-driver-adapters.yml @@ -25,24 +25,24 @@ jobs: fail-fast: false matrix: adapter: - - name: '@prisma/adapter-planetscale' + - name: 'planetscale (napi)' setup_task: 'dev-planetscale-js' - - name: '@prisma/adapter-pg (napi)' + - name: 'pg (napi)' setup_task: 'dev-pg-js' - - name: '@prisma/adapter-neon (ws) (napi)' + - name: 'neon (ws) (napi)' setup_task: 'dev-neon-js' - - name: '@prisma/adapter-libsql (Turso) (napi)' + - name: 'libsql (napi)' setup_task: 'dev-libsql-js' - - name: '@prisma/adapter-planetscale' + - name: 'planetscale (wasm)' setup_task: 'dev-planetscale-wasm' needs_wasm_pack: true - - name: '@prisma/adapter-pg (wasm)' + - name: 'pg (wasm)' setup_task: 'dev-pg-wasm' needs_wasm_pack: true - - name: '@prisma/adapter-neon (ws) (wasm)' + - name: 'neon (ws) (wasm)' setup_task: 'dev-neon-wasm' needs_wasm_pack: true - - name: '@prisma/adapter-libsql (Turso) (wasm)' + - name: 'libsql (Turso) (wasm)' setup_task: 'dev-libsql-wasm' needs_wasm_pack: true node_version: ['18'] From d1fab86b55a3fb027e51129e744fcdc5aa2eef08 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 17:36:01 +0100 Subject: [PATCH 10/18] Skip planetscale wasm tests --- .../tests/new/regressions/prisma_7434.rs | 3 ++- .../tests/queries/batch/in_selection_batching.rs | 16 ++++++++++++++-- .../tests/queries/data_types/bytes.rs | 7 ++++++- .../tests/queries/filters/bigint_filter.rs | 5 ++++- .../tests/queries/filters/bytes_filter.rs | 5 ++++- .../filters/field_reference/bigint_filter.rs | 10 ++++++++-- .../filters/field_reference/bytes_filter.rs | 5 ++++- .../filters/field_reference/datetime_filter.rs | 10 ++++++++-- .../filters/field_reference/float_filter.rs | 10 ++++++++-- .../filters/field_reference/int_filter.rs | 10 ++++++++-- .../filters/field_reference/string_filter.rs | 6 +++--- .../tests/raw/sql/input_coercion.rs | 6 +++++- .../tests/raw/sql/null_list.rs | 6 +++++- .../tests/writes/data_types/bigint.rs | 6 +++++- .../tests/writes/data_types/bytes.rs | 2 +- 15 files changed, 85 insertions(+), 22 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs index 1d96b570d539..8e5fb2457b15 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_7434.rs @@ -8,7 +8,8 @@ mod not_in_batching { CockroachDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm"), - Sqlite("libsql.js.wasm") + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") ))] async fn not_in_batch_filter(runner: Runner) -> TestResult<()> { runner.query(r#"mutation { createManyTestModel(data: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]) { count }}"#).await?.assert_success(); diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs index 1bcdb7ce7b5a..7aeb32902651 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs @@ -88,7 +88,13 @@ mod isb { Ok(()) } - #[connector_test(exclude(MongoDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm"), Sqlite("libsql.js.wasm")))] + #[connector_test(exclude( + MongoDb, + Postgres("pg.js.wasm"), + Postgres("neon.js.wasm"), + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") + ))] async fn order_by_aggregation_should_fail(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; @@ -103,7 +109,13 @@ mod isb { Ok(()) } - #[connector_test(exclude(MongoDb, Postgres("pg.js.wasm"), Postgres("neon.js.wasm"), Sqlite("libsql.js.wasm")))] + #[connector_test(exclude( + MongoDb, + Postgres("pg.js.wasm"), + Postgres("neon.js.wasm"), + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") + ))] async fn order_by_relevance_should_fail(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs index 314d3ebb71de..265a75763794 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/bytes.rs @@ -2,7 +2,12 @@ use query_engine_tests::*; #[test_suite( schema(common_nullable_types), - exclude(Postgres("pg.js.wasm"), Postgres("neon.js.wasm"), Sqlite("libsql.js.wasm")) + exclude( + Postgres("pg.js.wasm"), + Postgres("neon.js.wasm"), + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") + ) )] mod bytes { use query_engine_tests::{run_query, EngineProtocol, Runner}; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bigint_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bigint_filter.rs index 88816553094d..16e5804cd7f6 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bigint_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bigint_filter.rs @@ -1,7 +1,10 @@ use super::common_test_data; use query_engine_tests::*; -#[test_suite(schema(schemas::common_nullable_types), exclude(Sqlite("libsql.js.wasm")))] +#[test_suite( + schema(schemas::common_nullable_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) +)] mod bigint_filter_spec { use query_engine_tests::run_query; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bytes_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bytes_filter.rs index 30ef2baa002c..58ec7e08f8c8 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bytes_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/bytes_filter.rs @@ -1,7 +1,10 @@ use super::common_test_data; use query_engine_tests::*; -#[test_suite(schema(schemas::common_nullable_types), exclude(Sqlite("libsql.js.wasm")))] +#[test_suite( + schema(schemas::common_nullable_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) +)] mod bytes_filter_spec { use query_engine_tests::run_query; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs index 58cacbef0601..0ef65c7af43a 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bigint_filter.rs @@ -6,7 +6,10 @@ mod bigint_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(setup::common_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + )] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -28,7 +31,10 @@ mod bigint_filter { Ok(()) } - #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(setup::common_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + )] async fn numeric_comparison_filters(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs index 48add1c30147..4db5680f6c21 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs @@ -6,7 +6,10 @@ mod bytes_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(setup::common_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + )] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs index 6308f6ea5515..2753471bc635 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/datetime_filter.rs @@ -6,7 +6,10 @@ mod datetime_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(setup::common_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + )] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -28,7 +31,10 @@ mod datetime_filter { Ok(()) } - #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(setup::common_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + )] async fn numeric_comparison_filters(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs index d1e6b5c23f49..f40f73bbc180 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/float_filter.rs @@ -6,7 +6,10 @@ mod float_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(setup::common_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + )] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -28,7 +31,10 @@ mod float_filter { Ok(()) } - #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(setup::common_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + )] async fn numeric_comparison_filters(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs index b66f0387b25f..cedbb81c3a1f 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/int_filter.rs @@ -6,7 +6,10 @@ mod int_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(setup::common_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + )] async fn basic_where(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -28,7 +31,10 @@ mod int_filter { Ok(()) } - #[connector_test(schema(setup::common_types), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test( + schema(setup::common_types), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + )] async fn numeric_comparison_filters(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs index db1041d9a23c..c62821ef4604 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/string_filter.rs @@ -6,7 +6,7 @@ mod string_filter { use super::setup; use query_engine_tests::run_query; - #[connector_test(exclude(Sqlite("libsql.js.wasm")))] + #[connector_test(exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")))] async fn basic_where_sensitive(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -50,7 +50,7 @@ mod string_filter { Ok(()) } - #[connector_test(exclude(Sqlite("libsql.js.wasm")))] + #[connector_test(exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")))] async fn numeric_comparison_filters_sensitive(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; @@ -225,7 +225,7 @@ mod string_filter { Ok(()) } - #[connector_test(exclude(Sqlite("libsql.js.wasm")))] + #[connector_test(exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")))] async fn string_comparison_filters_sensitive(runner: Runner) -> TestResult<()> { setup::test_data_common_types(&runner).await?; run_query!( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs index ab7d519429bc..4a48a8974240 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs @@ -5,7 +5,11 @@ mod input_coercion { use query_engine_tests::fmt_execute_raw; // Checks that query raw inputs are coerced to the correct types - #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")))] + #[connector_test(exclude( + Postgres("pg.js.wasm", "neon.js.wasm"), + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") + ))] async fn scalar_input_correctly_coerced(runner: Runner) -> TestResult<()> { run_query!( &runner, diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs index 7ff845c1df56..4b096a6ff8a5 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs @@ -7,7 +7,11 @@ mod null_list { #[connector_test( schema(common_list_types), - exclude(Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")) + exclude( + Postgres("pg.js.wasm", "neon.js.wasm"), + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") + ) )] async fn null_scalar_lists(runner: Runner) -> TestResult<()> { run_query!( diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs index eceef98beafa..c78b522f4994 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs @@ -17,7 +17,11 @@ mod bigint { } // "Using a BigInt field" should "work" - #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm"), Sqlite("libsql.js.wasm")))] + #[connector_test(exclude( + Postgres("pg.js.wasm", "neon.js.wasm"), + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") + ))] async fn using_bigint_field(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs index a39221655d2f..2bfd01003844 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs @@ -31,7 +31,7 @@ mod bytes { } // "Using a bytes field" should "work" - #[connector_test(schema(basic), exclude(Sqlite("libsql.js.wasm")))] + #[connector_test(schema(basic), exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")))] async fn using_bytes_field(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { From 9b7a10551656c302f2324d9fd6eeba6995e7f1b1 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 17:43:22 +0100 Subject: [PATCH 11/18] Fix some incorrect skips --- .../queries/batch/in_selection_batching.rs | 17 ++++++++++------- .../tests/raw/sql/null_list.rs | 9 +-------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs index 7aeb32902651..aacdb50f687c 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/batch/in_selection_batching.rs @@ -109,13 +109,16 @@ mod isb { Ok(()) } - #[connector_test(exclude( - MongoDb, - Postgres("pg.js.wasm"), - Postgres("neon.js.wasm"), - Sqlite("libsql.js.wasm"), - Vitess("planetscale.js.wasm") - ))] + #[connector_test( + capabilities(FullTextSearchWithoutIndex), + exclude( + MongoDb, + Postgres("pg.js.wasm"), + Postgres("neon.js.wasm"), + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") + ) + )] async fn order_by_relevance_should_fail(runner: Runner) -> TestResult<()> { create_test_data(&runner).await?; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs index 4b096a6ff8a5..d63c9c8226d1 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs @@ -5,14 +5,7 @@ use query_engine_tests::*; mod null_list { use query_engine_tests::{fmt_query_raw, run_query, run_query_pretty}; - #[connector_test( - schema(common_list_types), - exclude( - Postgres("pg.js.wasm", "neon.js.wasm"), - Sqlite("libsql.js.wasm"), - Vitess("planetscale.js.wasm") - ) - )] + #[connector_test(schema(common_list_types), exclude(Postgres("pg.js.wasm", "neon.js.wasm"),))] async fn null_scalar_lists(runner: Runner) -> TestResult<()> { run_query!( &runner, From 9301638ef5b64eb1710a3f395503ec918d9e7679 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 17:46:11 +0100 Subject: [PATCH 12/18] And more fixes --- .../query-engine-tests/tests/writes/data_types/bytes.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs index 2bfd01003844..94fe1cf1a0c8 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs @@ -1,6 +1,9 @@ use query_engine_tests::*; -#[test_suite(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] +#[test_suite(exclude( + Postgres("pg.js.wasm", "neon.js.wasm"), + exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) +))] mod bytes { use indoc::indoc; use query_engine_tests::run_query; @@ -31,7 +34,7 @@ mod bytes { } // "Using a bytes field" should "work" - #[connector_test(schema(basic), exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")))] + #[connector_test(schema(basic))] async fn using_bytes_field(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { From e6b148d9e757d7febf6e1a2c7416d393ffe87048 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 18:00:48 +0100 Subject: [PATCH 13/18] Be careful when copy-pasting, please --- .../query-engine-tests/tests/writes/data_types/bytes.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs index 94fe1cf1a0c8..654463f491f7 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bytes.rs @@ -2,7 +2,8 @@ use query_engine_tests::*; #[test_suite(exclude( Postgres("pg.js.wasm", "neon.js.wasm"), - exclude(Sqlite("libsql.js.wasm"), Vitess("planetscale.js.wasm")) + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") ))] mod bytes { use indoc::indoc; From 941afe7bd41837d0205bec1aaa7e75c66fe2ccd7 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 18:30:45 +0100 Subject: [PATCH 14/18] One more fix --- .../query-engine-tests/tests/raw/sql/input_coercion.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs index 4a48a8974240..215cd539af3c 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/input_coercion.rs @@ -5,11 +5,7 @@ mod input_coercion { use query_engine_tests::fmt_execute_raw; // Checks that query raw inputs are coerced to the correct types - #[connector_test(exclude( - Postgres("pg.js.wasm", "neon.js.wasm"), - Sqlite("libsql.js.wasm"), - Vitess("planetscale.js.wasm") - ))] + #[connector_test(only(Postgres), exclude(Postgres("pg.js.wasm", "neon.js.wasm"),))] async fn scalar_input_correctly_coerced(runner: Runner) -> TestResult<()> { run_query!( &runner, From a2cf4b2b64485663657c17a52c5efdfe8b85b64d Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 18:34:33 +0100 Subject: [PATCH 15/18] Fix null lists --- .../query-engine-tests/tests/raw/sql/null_list.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs index d63c9c8226d1..4ae2a2b6b57c 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/raw/sql/null_list.rs @@ -5,7 +5,11 @@ use query_engine_tests::*; mod null_list { use query_engine_tests::{fmt_query_raw, run_query, run_query_pretty}; - #[connector_test(schema(common_list_types), exclude(Postgres("pg.js.wasm", "neon.js.wasm"),))] + #[connector_test( + schema(common_list_types), + only(Postgres), + exclude(Postgres("pg.js.wasm", "neon.js.wasm"),) + )] async fn null_scalar_lists(runner: Runner) -> TestResult<()> { run_query!( &runner, From f0d3b034472a5b0fb763e8723bdbf05b48cc6fe2 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Thu, 7 Dec 2023 19:07:10 +0100 Subject: [PATCH 16/18] Again: be careful when copy-pasting --- .../tests/queries/filters/field_reference/bytes_filter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs index 4db5680f6c21..a77bf6e765b2 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/filters/field_reference/bytes_filter.rs @@ -58,7 +58,7 @@ mod bytes_filter { } #[connector_test( - schema(setup::common_mixed_types), + schema(setup::common_list_types), exclude(Postgres("pg.js.wasm", "neon.js.wasm")), capabilities(ScalarLists) )] From 4673de39f564e939f751719ec8a4b625e8306990 Mon Sep 17 00:00:00 2001 From: Sergey Tatarintsev Date: Fri, 8 Dec 2023 08:51:51 +0100 Subject: [PATCH 17/18] Skip timestamp test on libsql and planetscale --- .../tests/new/regressions/prisma_12572.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_12572.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_12572.rs index 9a901a57dfff..a107b354d159 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_12572.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_12572.rs @@ -26,7 +26,11 @@ mod prisma_12572 { .to_owned() } - #[connector_test(exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] + #[connector_test(exclude( + Postgres("pg.js.wasm", "neon.js.wasm"), + Sqlite("libsql.js.wasm"), + Vitess("planetscale.js.wasm") + ))] async fn all_generated_timestamps_are_the_same(runner: Runner) -> TestResult<()> { runner .query(r#"mutation { createOneTest1(data: {id:"one", test2s: { create: {id: "two"}}}) { id }}"#) From 99870b327f2a0a0cc0c61ca79746213ec8b1c1cc Mon Sep 17 00:00:00 2001 From: Serhii Tatarintsev Date: Fri, 8 Dec 2023 08:53:40 +0100 Subject: [PATCH 18/18] Update .github/workflows/test-query-engine-driver-adapters.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joël Galeran --- .github/workflows/test-query-engine-driver-adapters.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-query-engine-driver-adapters.yml b/.github/workflows/test-query-engine-driver-adapters.yml index 682ce20cdd1a..d9af2a375a98 100644 --- a/.github/workflows/test-query-engine-driver-adapters.yml +++ b/.github/workflows/test-query-engine-driver-adapters.yml @@ -31,7 +31,7 @@ jobs: setup_task: 'dev-pg-js' - name: 'neon (ws) (napi)' setup_task: 'dev-neon-js' - - name: 'libsql (napi)' + - name: 'libsql (Turso) (napi)' setup_task: 'dev-libsql-js' - name: 'planetscale (wasm)' setup_task: 'dev-planetscale-wasm'