From 10131e49d39f501899591372a3a80e9d8a9f0692 Mon Sep 17 00:00:00 2001 From: Dave Date: Sat, 14 Oct 2023 10:34:43 +0200 Subject: [PATCH] disable dbt tests for athena iceberg --- tests/load/pipeline/test_dbt_helper.py | 4 ++++ tests/load/utils.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/load/pipeline/test_dbt_helper.py b/tests/load/pipeline/test_dbt_helper.py index e55f5b2964..d6e9167555 100644 --- a/tests/load/pipeline/test_dbt_helper.py +++ b/tests/load/pipeline/test_dbt_helper.py @@ -58,6 +58,8 @@ def test_run_jaffle_package(destination_config: DestinationTestConfiguration, db @pytest.mark.parametrize("destination_config", destinations_configs(default_sql_configs=True), ids=lambda x: x.name) def test_run_chess_dbt(destination_config: DestinationTestConfiguration, dbt_venv: Venv) -> None: from docs.examples.chess.chess import chess + if not destination_config.supports_dbt: + pytest.mark.skip("dbt is not supported for this destination configuration") # provide chess url via environ os.environ["CHESS_URL"] = "https://api.chess.com/pub/" @@ -95,6 +97,8 @@ def test_run_chess_dbt(destination_config: DestinationTestConfiguration, dbt_ven @pytest.mark.parametrize("destination_config", destinations_configs(default_sql_configs=True), ids=lambda x: x.name) def test_run_chess_dbt_to_other_dataset(destination_config: DestinationTestConfiguration, dbt_venv: Venv) -> None: from docs.examples.chess.chess import chess + if not destination_config.supports_dbt: + pytest.mark.skip("dbt is not supported for this destination configuration") # provide chess url via environ os.environ["CHESS_URL"] = "https://api.chess.com/pub/" diff --git a/tests/load/utils.py b/tests/load/utils.py index 813bd69ec3..b03e325cc0 100644 --- a/tests/load/utils.py +++ b/tests/load/utils.py @@ -54,6 +54,7 @@ class DestinationTestConfiguration: extra_info: Optional[str] = None supports_merge: bool = True # TODO: take it from client base class force_iceberg: bool = False + supports_dbt: bool = True @property def name(self) -> str: @@ -110,7 +111,7 @@ def destinations_configs( destination_configs += [DestinationTestConfiguration(destination=destination) for destination in SQL_DESTINATIONS if destination != "athena"] # athena needs filesystem staging, which will be automatically set, we have to supply a bucket url though destination_configs += [DestinationTestConfiguration(destination="athena", supports_merge=False, bucket_url=AWS_BUCKET)] - destination_configs += [DestinationTestConfiguration(destination="athena", staging="filesystem", file_format="parquet", bucket_url=AWS_BUCKET, force_iceberg=True, supports_merge=False, extra_info="iceberg")] + destination_configs += [DestinationTestConfiguration(destination="athena", staging="filesystem", file_format="parquet", bucket_url=AWS_BUCKET, force_iceberg=True, supports_merge=False, supports_dbt=False, extra_info="iceberg")] if default_vector_configs: # for now only weaviate