From 006a3100a5c5081defd025e5aa05854922be3482 Mon Sep 17 00:00:00 2001 From: Itamar Hartstein Date: Wed, 29 May 2024 00:15:19 +0300 Subject: [PATCH] Bugfix in test - test_exposure_schema_validity_invalid_type_name_present_in_error --- .../tests/test_exposure_schema_validity.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/integration_tests/tests/test_exposure_schema_validity.py b/integration_tests/tests/test_exposure_schema_validity.py index 54f9b11b7..83b1627d1 100644 --- a/integration_tests/tests/test_exposure_schema_validity.py +++ b/integration_tests/tests/test_exposure_schema_validity.py @@ -145,9 +145,18 @@ def test_exposure_schema_validity_correct_columns_and_invalid_type( def test_exposure_schema_validity_invalid_type_name_present_in_error( test_id: str, dbt_project: DbtProject ): + # Specify valid type per target + data_type = { + "snowflake": "NUMERIC", + "bigquery": "NUMERIC", + "spark": "int", + "databricks": "int", + "athena": "int", + "trino": "int", + }.get(dbt_project.dbt_runner.target, "numeric") DBT_TEST_ARGS = { "node": "models.exposures_test", - "columns": [{"name": "order_id", "dtype": "numeric", "data_type": "numeric"}], + "columns": [{"name": "order_id", "dtype": data_type, "data_type": data_type}], "exposures": { "ZOMG": { "meta": {