diff --git a/pyproject.toml b/pyproject.toml index e7e283c2..acef4e33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ dependencies = [ "dbt-adapters>=0.1.0a1,<2.0", "psycopg2>=2.9,<3.0", # installed via dbt-adapters but used directly - "dbt-common<2.0", + "dbt-common>=0.1.0a1,<2.0", "agate>=1.0,<2.0", ] [project.urls] diff --git a/tests/functional/shared_tests/test_column_types.py b/tests/functional/shared_tests/test_column_types.py index f5037860..47dec245 100644 --- a/tests/functional/shared_tests/test_column_types.py +++ b/tests/functional/shared_tests/test_column_types.py @@ -1,5 +1,5 @@ -from dbt.tests.adapter.column_types.test_column_types import BaseColumnTypes +from dbt.tests.adapter.column_types.test_column_types import BasePostgresColumnTypes -class TestPostgresColumnTypes(BaseColumnTypes): +class TestPostgresColumnTypes(BasePostgresColumnTypes): pass diff --git a/tests/functional/shared_tests/test_hooks/data/seed_model.sql b/tests/functional/shared_tests/test_hooks/data/seed_model.sql new file mode 100644 index 00000000..6727acb3 --- /dev/null +++ b/tests/functional/shared_tests/test_hooks/data/seed_model.sql @@ -0,0 +1,16 @@ +drop table if exists {schema}.on_model_hook; + +create table {schema}.on_model_hook ( + test_state TEXT, -- start|end + target_dbname TEXT, + target_host TEXT, + target_name TEXT, + target_schema TEXT, + target_type TEXT, + target_user TEXT, + target_pass TEXT, + target_threads INTEGER, + run_started_at TEXT, + invocation_id TEXT, + thread_id TEXT +); diff --git a/tests/functional/shared_tests/test_hooks/data/seed_run.sql b/tests/functional/shared_tests/test_hooks/data/seed_run.sql new file mode 100644 index 00000000..079ed34a --- /dev/null +++ b/tests/functional/shared_tests/test_hooks/data/seed_run.sql @@ -0,0 +1,16 @@ +drop table if exists {schema}.on_run_hook; + +create table {schema}.on_run_hook ( + test_state TEXT, -- start|end + target_dbname TEXT, + target_host TEXT, + target_name TEXT, + target_schema TEXT, + target_type TEXT, + target_user TEXT, + target_pass TEXT, + target_threads INTEGER, + run_started_at TEXT, + invocation_id TEXT, + thread_id TEXT +); diff --git a/tests/functional/shared_tests/test_hooks.py b/tests/functional/shared_tests/test_hooks/test_hooks.py similarity index 92% rename from tests/functional/shared_tests/test_hooks.py rename to tests/functional/shared_tests/test_hooks/test_hooks.py index 3db138eb..84381130 100644 --- a/tests/functional/shared_tests/test_hooks.py +++ b/tests/functional/shared_tests/test_hooks/test_hooks.py @@ -1,3 +1,7 @@ +""" +This file needs to be in its own directory because it uses a `data` directory. +Placing this file in its own directory avoids collisions. +""" from dbt.tests.adapter.hooks.test_model_hooks import ( BasePrePostModelHooks, BaseHookRefs, diff --git a/tests/functional/shared_tests/seed_bom.csv b/tests/functional/shared_tests/test_simple_seed/seed_bom.csv similarity index 100% rename from tests/functional/shared_tests/seed_bom.csv rename to tests/functional/shared_tests/test_simple_seed/seed_bom.csv diff --git a/tests/functional/shared_tests/test_simple_seed.py b/tests/functional/shared_tests/test_simple_seed/test_simple_seed.py similarity index 89% rename from tests/functional/shared_tests/test_simple_seed.py rename to tests/functional/shared_tests/test_simple_seed/test_simple_seed.py index 97b8870a..cd849788 100644 --- a/tests/functional/shared_tests/test_simple_seed.py +++ b/tests/functional/shared_tests/test_simple_seed/test_simple_seed.py @@ -1,3 +1,7 @@ +""" +This file needs to be in its own directory because it creates a `data` directory at run time. +Placing this file in its own directory avoids collisions. +""" from dbt.tests.adapter.simple_seed.test_seed import ( BaseBasicSeedTests, BaseSeedConfigFullRefreshOn,