From 7e8cf3a32d4ce598d503a4f6f300488bed6fcec1 Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Tue, 1 Oct 2024 17:45:21 +0100 Subject: [PATCH 1/5] Fix hook tests --- tests/functional/schema_tests/test_schema_v2_tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/schema_tests/test_schema_v2_tests.py b/tests/functional/schema_tests/test_schema_v2_tests.py index aae164a1..68158efd 100644 --- a/tests/functional/schema_tests/test_schema_v2_tests.py +++ b/tests/functional/schema_tests/test_schema_v2_tests.py @@ -472,9 +472,9 @@ def test_hooks_do_run_for_tests( ): # This passes now that hooks run, a behavior we changed in v1.0 results = run_dbt(["test", "--model", "ephemeral"]) - assert len(results) == 1 + assert len(results) == 3 for result in results: - assert result.status == "pass" + assert result.status in ("pass", "success") assert not result.skipped assert result.failures == 0, "test {} failed".format(result.node.name) @@ -505,9 +505,9 @@ def test_these_hooks_dont_run_for_tests( ): # This would fail if the hooks ran results = run_dbt(["test", "--model", "ephemeral"]) - assert len(results) == 1 + assert len(results) == 3 for result in results: - assert result.status == "pass" + assert result.status in ("pass", "success") assert not result.skipped assert result.failures == 0, "test {} failed".format(result.node.name) From 6a2820dab302a5917bcfe63c0724a12cf2adbc05 Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Tue, 1 Oct 2024 17:50:28 +0100 Subject: [PATCH 2/5] Remove extra whitespace --- .changes/1.9.0-b1.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.changes/1.9.0-b1.md b/.changes/1.9.0-b1.md index 9a06cee4..59bd21c5 100644 --- a/.changes/1.9.0-b1.md +++ b/.changes/1.9.0-b1.md @@ -28,4 +28,3 @@ - [@morsapaes](https://github.com/morsapaes) ([#120](https://github.com/dbt-labs/dbt-postgres/issues/120)) - [@peterallenwebb](https://github.com/peterallenwebb) ([#123](https://github.com/dbt-labs/dbt-postgres/issues/123)) - [@versusfacit](https://github.com/versusfacit) ([#85](https://github.com/dbt-labs/dbt-postgres/issues/85)) - From bd2f488f3f96a3c733b53930a808f2e357427859 Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Tue, 1 Oct 2024 18:16:23 +0100 Subject: [PATCH 3/5] Use dbt-adapters off the fix_hook_tests branch --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 726dc64a..e2eaa26d 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 @ git+https://github.com/dbt-labs/dbt-adapters.git@fix_hook_tests", "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-core @ git+https://github.com/dbt-labs/dbt-core.git#subdirectory=core", From a376228069d2c8fd411ab02c49f67a4a93917f43 Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Tue, 1 Oct 2024 18:34:00 +0100 Subject: [PATCH 4/5] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e2eaa26d..f8eba201 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ path = "dbt/adapters/postgres/__version__.py" dependencies = [ "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@fix_hook_tests", "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@fix_hook_tests#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"', From 1a5d1de82d10c7cafaa0659537d20e6adf52a36d Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Tue, 1 Oct 2024 18:42:40 +0100 Subject: [PATCH 5/5] Discard changes to pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f8eba201..726dc64a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,9 +54,9 @@ path = "dbt/adapters/postgres/__version__.py" [tool.hatch.envs.default] dependencies = [ - "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@fix_hook_tests", + "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git", "dbt-common @ git+https://github.com/dbt-labs/dbt-common.git", - "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git@fix_hook_tests#subdirectory=dbt-tests-adapter", + "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git#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"',