From 18d81b5276a25c5d1fd9016e373c8e70ffbae20e Mon Sep 17 00:00:00 2001 From: McKnight-42 Date: Tue, 9 Jul 2024 11:38:55 -0500 Subject: [PATCH 1/6] modify project.toml for testing --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 92fbf82a..4019339b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ path = "dbt/adapters/postgres/__version__.py" [tool.hatch.envs.default] dependencies = [ - "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git", + "dbt-adapters @ file:///Users/matthewmcknight/git/dbt-adapters", "dbt-common @ git+https://github.com/dbt-labs/dbt-common.git", 'pre-commit==3.7.0;python_version>="3.9"', 'pre-commit==3.5.0;python_version=="3.8"', @@ -71,7 +71,7 @@ docker-prod = "docker build -f docker/Dockerfile -t dbt-postgres ." [tool.hatch.envs.unit-tests] dependencies = [ - "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git", + "dbt-adapters @ file:///Users/matthewmcknight/git/dbt-adapters", "dbt-common @ git+https://github.com/dbt-labs/dbt-common.git", "dbt-core @ git+https://github.com/dbt-labs/dbt-core.git#subdirectory=core", "freezegun", @@ -86,7 +86,7 @@ all = "python -m pytest {args:tests/unit}" [tool.hatch.envs.integration-tests] template = "unit-tests" extra-dependencies = [ - "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter", + "dbt-tests-adapter @ file:///Users/matthewmcknight/git/dbt-adapters/dbt-tests-adapter", ] [tool.hatch.envs.integration-tests.env-vars] DBT_TEST_USER_1 = "dbt_test_user_1" From 62c32a129588322815f6994fd0efc8cd2bdaeacd Mon Sep 17 00:00:00 2001 From: McKnight-42 Date: Thu, 11 Jul 2024 13:30:03 -0500 Subject: [PATCH 2/6] point to git branch --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4019339b..bf260025 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ path = "dbt/adapters/postgres/__version__.py" [tool.hatch.envs.default] dependencies = [ - "dbt-adapters @ file:///Users/matthewmcknight/git/dbt-adapters", + "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@mcknight/ct-2819", "dbt-common @ git+https://github.com/dbt-labs/dbt-common.git", 'pre-commit==3.7.0;python_version>="3.9"', 'pre-commit==3.5.0;python_version=="3.8"', @@ -71,7 +71,7 @@ docker-prod = "docker build -f docker/Dockerfile -t dbt-postgres ." [tool.hatch.envs.unit-tests] dependencies = [ - "dbt-adapters @ file:///Users/matthewmcknight/git/dbt-adapters", + "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@mcknight/ct-2819", "dbt-common @ git+https://github.com/dbt-labs/dbt-common.git", "dbt-core @ git+https://github.com/dbt-labs/dbt-core.git#subdirectory=core", "freezegun", From 5d9c9df9292cdb2ad0c1918e015536425c73dee9 Mon Sep 17 00:00:00 2001 From: McKnight-42 Date: Thu, 11 Jul 2024 14:36:11 -0500 Subject: [PATCH 3/6] repoint to github repos after testing locally --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bf260025..5eac6e10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ all = "python -m pytest {args:tests/unit}" [tool.hatch.envs.integration-tests] template = "unit-tests" extra-dependencies = [ - "dbt-tests-adapter @ file:///Users/matthewmcknight/git/dbt-adapters/dbt-tests-adapter", + "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter", ] [tool.hatch.envs.integration-tests.env-vars] DBT_TEST_USER_1 = "dbt_test_user_1" From c9546cade4ee162995f1f6567455f9765208738e Mon Sep 17 00:00:00 2001 From: McKnight-42 Date: Tue, 16 Jul 2024 13:32:26 -0500 Subject: [PATCH 4/6] pull in new basclass and run test --- tests/functional/shared_tests/test_incremental.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/shared_tests/test_incremental.py b/tests/functional/shared_tests/test_incremental.py index 7782316a..53656e3f 100644 --- a/tests/functional/shared_tests/test_incremental.py +++ b/tests/functional/shared_tests/test_incremental.py @@ -3,6 +3,7 @@ ) from dbt.tests.adapter.incremental.test_incremental_on_schema_change import ( BaseIncrementalOnSchemaChange, + BaseIncrementalCaseSenstivityOnSchemaChange, ) from dbt.tests.adapter.incremental.test_incremental_predicates import BaseIncrementalPredicates from dbt.tests.adapter.incremental.test_incremental_unique_id import BaseIncrementalUniqueKey @@ -22,3 +23,7 @@ class TestIncrementalPredicatesDeleteInsert(BaseIncrementalPredicates): class TestIncrementalUniqueKey(BaseIncrementalUniqueKey): pass + + +class TestIncrementalCaseSenstivityOnSchemaChange(BaseIncrementalCaseSenstivityOnSchemaChange): + pass From d6c7d50d7039fc2e2be637d9d6a44ade88f05d78 Mon Sep 17 00:00:00 2001 From: McKnight-42 Date: Wed, 17 Jul 2024 09:57:57 -0500 Subject: [PATCH 5/6] update project.toml dbt-tests-adapters ref --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5eac6e10..c2305f16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ all = "python -m pytest {args:tests/unit}" [tool.hatch.envs.integration-tests] template = "unit-tests" extra-dependencies = [ - "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter", + "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git@mcknight/ct-2819#subdirectory=dbt-tests-adapter", ] [tool.hatch.envs.integration-tests.env-vars] DBT_TEST_USER_1 = "dbt_test_user_1" From 10034924f2288257562025874f5d9d41e07ff445 Mon Sep 17 00:00:00 2001 From: McKnight-42 Date: Wed, 17 Jul 2024 10:11:48 -0500 Subject: [PATCH 6/6] fix project.toml to fully match newer version --- pyproject.toml | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fd3ddcc0..2280802e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,41 +55,16 @@ path = "dbt/adapters/postgres/__version__.py" dependencies = [ "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@mcknight/ct-2819", "dbt-common @ git+https://github.com/dbt-labs/dbt-common.git", - "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter", + "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git@mcknight/ct-2819#subdirectory=dbt-tests-adapter", "dbt-core @ git+https://github.com/dbt-labs/dbt-core.git#subdirectory=core", 'pre-commit==3.7.0;python_version>="3.9"', 'pre-commit==3.5.0;python_version=="3.8"', -] -[tool.hatch.envs.default.scripts] -dev = "pre-commit install" -code-quality = "pre-commit run --all-files" -docker-dev = [ - "echo Does not support integration testing, only development and unit testing. See issue https://github.com/dbt-labs/dbt-postgres/issues/99", - "docker build -f docker/dev.Dockerfile -t dbt-postgres-dev .", - "docker run --rm -it --name dbt-postgres-dev -v $(pwd):/opt/code dbt-postgres-dev", -] -docker-prod = "docker build -f docker/Dockerfile -t dbt-postgres ." - -[tool.hatch.envs.unit-tests] -dependencies = [ - "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@mcknight/ct-2819", - "dbt-common @ git+https://github.com/dbt-labs/dbt-common.git", - "dbt-core @ git+https://github.com/dbt-labs/dbt-core.git#subdirectory=core", "freezegun", "pytest", "pytest-dotenv", "pytest-mock", "pytest-xdist", ] -[tool.hatch.envs.unit-tests.scripts] -all = "python -m pytest {args:tests/unit}" - -[tool.hatch.envs.integration-tests] -template = "unit-tests" -extra-dependencies = [ - "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git@mcknight/ct-2819#subdirectory=dbt-tests-adapter", -] -[tool.hatch.envs.integration-tests.env-vars] [tool.hatch.envs.default.env-vars] DBT_TEST_USER_1 = "dbt_test_user_1" DBT_TEST_USER_2 = "dbt_test_user_2"