From 4813ca0f66b6245e2f571496f404ebd1a3cdfc6c Mon Sep 17 00:00:00 2001 From: Anders Swanson Date: Fri, 10 Nov 2023 16:05:02 -0500 Subject: [PATCH 1/6] sort imports --- tests/functional/adapter/test_basic.py | 44 +++++++++++--------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/tests/functional/adapter/test_basic.py b/tests/functional/adapter/test_basic.py index c6ce6918..efac4316 100644 --- a/tests/functional/adapter/test_basic.py +++ b/tests/functional/adapter/test_basic.py @@ -1,34 +1,26 @@ -import pytest - import os + +import pytest +from dbt.tests.adapter.basic.files import (base_ephemeral_sql, base_table_sql, + base_view_sql, ephemeral_table_sql, + ephemeral_view_sql) from dbt.tests.adapter.basic.test_base import BaseSimpleMaterializations -from dbt.tests.adapter.basic.test_singular_tests import BaseSingularTests -from dbt.tests.adapter.basic.test_singular_tests_ephemeral import BaseSingularTestsEphemeral +from dbt.tests.adapter.basic.test_docs_generate import (BaseDocsGenerate, + BaseDocsGenReferences) from dbt.tests.adapter.basic.test_empty import BaseEmpty from dbt.tests.adapter.basic.test_ephemeral import BaseEphemeral -from dbt.tests.adapter.basic.test_incremental import BaseIncremental from dbt.tests.adapter.basic.test_generic_tests import BaseGenericTests -from dbt.tests.adapter.basic.test_docs_generate import BaseDocsGenerate, BaseDocsGenReferences -from dbt.tests.adapter.basic.test_snapshot_check_cols import BaseSnapshotCheckCols -from dbt.tests.adapter.basic.test_snapshot_timestamp import BaseSnapshotTimestamp -from dbt.tests.adapter.basic.files import ( - base_view_sql, - base_table_sql, - base_ephemeral_sql, - ephemeral_view_sql, - ephemeral_table_sql -) - -from dbt.tests.util import ( - run_dbt, - get_manifest, - check_result_nodes_by_name, - relation_from_name, - check_relations_equal, -) - -from tests.util import get_s3_location, get_region, cleanup_s3_location - +from dbt.tests.adapter.basic.test_incremental import BaseIncremental +from dbt.tests.adapter.basic.test_singular_tests import BaseSingularTests +from dbt.tests.adapter.basic.test_singular_tests_ephemeral import \ + BaseSingularTestsEphemeral +from dbt.tests.adapter.basic.test_snapshot_check_cols import \ + BaseSnapshotCheckCols +from dbt.tests.adapter.basic.test_snapshot_timestamp import \ + BaseSnapshotTimestamp +from dbt.tests.util import (check_relations_equal, check_result_nodes_by_name, + get_manifest, relation_from_name, run_dbt) +from tests.util import cleanup_s3_location, get_region, get_s3_location s3bucket = get_s3_location() region = get_region() From 948fa5284ab635703d2debde2e8d166b55272fe9 Mon Sep 17 00:00:00 2001 From: Anders Swanson Date: Fri, 10 Nov 2023 16:06:21 -0500 Subject: [PATCH 2/6] test adapter methods --- tests/functional/adapter/test_basic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/functional/adapter/test_basic.py b/tests/functional/adapter/test_basic.py index efac4316..9a109274 100644 --- a/tests/functional/adapter/test_basic.py +++ b/tests/functional/adapter/test_basic.py @@ -4,6 +4,7 @@ from dbt.tests.adapter.basic.files import (base_ephemeral_sql, base_table_sql, base_view_sql, ephemeral_table_sql, ephemeral_view_sql) +from dbt.tests.adapter.basic.test_adapter_methods import BaseAdapterMethod from dbt.tests.adapter.basic.test_base import BaseSimpleMaterializations from dbt.tests.adapter.basic.test_docs_generate import (BaseDocsGenerate, BaseDocsGenReferences) @@ -50,6 +51,8 @@ """ base_materialized_var_sql = config_materialized_var + config_incremental_strategy + model_base +class TestBaseCachingGlue(BaseAdapterMethod): + pass class TestSimpleMaterializationsGlue(BaseSimpleMaterializations): # all tests within this test has the same schema From 221d413db40c82f2025d22bd03a4be2faca199ae Mon Sep 17 00:00:00 2001 From: Anders Swanson Date: Fri, 10 Nov 2023 16:08:05 -0500 Subject: [PATCH 3/6] re-enable DocsGenerate --- tests/functional/adapter/test_basic.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/functional/adapter/test_basic.py b/tests/functional/adapter/test_basic.py index 9a109274..c515b504 100644 --- a/tests/functional/adapter/test_basic.py +++ b/tests/functional/adapter/test_basic.py @@ -264,13 +264,12 @@ def test_generic_tests(self, project): pass -# To test -#class TestDocsGenerate(BaseDocsGenerate): -# pass +class TestDocsGenerateGlue(BaseDocsGenerate): + pass -#class TestDocsGenReferences(BaseDocsGenReferences): -# pass +class TestDocsGenReferencesGlue(BaseDocsGenReferences): + pass # To Dev From 9d68c669d17cac15de79ea0f9ae9a4d46e8280f0 Mon Sep 17 00:00:00 2001 From: Anders Swanson Date: Fri, 10 Nov 2023 16:10:27 -0500 Subject: [PATCH 4/6] test table materialization --- tests/functional/adapter/test_basic.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/adapter/test_basic.py b/tests/functional/adapter/test_basic.py index c515b504..21ffe4aa 100644 --- a/tests/functional/adapter/test_basic.py +++ b/tests/functional/adapter/test_basic.py @@ -19,6 +19,8 @@ BaseSnapshotCheckCols from dbt.tests.adapter.basic.test_snapshot_timestamp import \ BaseSnapshotTimestamp +from dbt.tests.adapter.basic.test_table_materialization import \ + BaseTableMaterialization from dbt.tests.util import (check_relations_equal, check_result_nodes_by_name, get_manifest, relation_from_name, run_dbt) from tests.util import cleanup_s3_location, get_region, get_s3_location @@ -279,3 +281,6 @@ class TestDocsGenReferencesGlue(BaseDocsGenReferences): #class TestSnapshotTimestampGlue(BaseSnapshotTimestamp): # pass + +class TestTableMatGlue(BaseTableMaterialization): + pass From db3142ea6e10919209b3bbbe5d775a62cc12652d Mon Sep 17 00:00:00 2001 From: Anders Swanson Date: Fri, 10 Nov 2023 16:11:54 -0500 Subject: [PATCH 5/6] test validate connection --- tests/functional/adapter/test_basic.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/adapter/test_basic.py b/tests/functional/adapter/test_basic.py index 21ffe4aa..7609d975 100644 --- a/tests/functional/adapter/test_basic.py +++ b/tests/functional/adapter/test_basic.py @@ -21,6 +21,8 @@ BaseSnapshotTimestamp from dbt.tests.adapter.basic.test_table_materialization import \ BaseTableMaterialization +from dbt.tests.adapter.basic.test_validate_connection import \ + BaseValidateConnection from dbt.tests.util import (check_relations_equal, check_result_nodes_by_name, get_manifest, relation_from_name, run_dbt) from tests.util import cleanup_s3_location, get_region, get_s3_location @@ -284,3 +286,6 @@ class TestDocsGenReferencesGlue(BaseDocsGenReferences): class TestTableMatGlue(BaseTableMaterialization): pass + +class TestValidateConnectionGlue(BaseValidateConnection): + pass \ No newline at end of file From f16f62d3029b9424a22e2396a5b934dcdbd85e60 Mon Sep 17 00:00:00 2001 From: Anders Swanson Date: Fri, 10 Nov 2023 16:13:53 -0500 Subject: [PATCH 6/6] re-enable snapshot tests --- tests/functional/adapter/test_basic.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/functional/adapter/test_basic.py b/tests/functional/adapter/test_basic.py index 7609d975..4222570d 100644 --- a/tests/functional/adapter/test_basic.py +++ b/tests/functional/adapter/test_basic.py @@ -276,13 +276,12 @@ class TestDocsGenReferencesGlue(BaseDocsGenReferences): pass -# To Dev -#class TestSnapshotCheckColsGlue(BaseSnapshotCheckCols): -# pass +class TestSnapshotCheckColsGlue(BaseSnapshotCheckCols): + pass -#class TestSnapshotTimestampGlue(BaseSnapshotTimestamp): -# pass +class TestSnapshotTimestampGlue(BaseSnapshotTimestamp): + pass class TestTableMatGlue(BaseTableMaterialization): pass