Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generalize BaseModelConstraintsRuntimeEnforcement #7805

Merged
merged 2 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20230606-132706.yaml
MichelleArk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: 'generalize BaseModelConstraintsRuntimeEnforcement '
time: 2023-06-06T13:27:06.025803-04:00
custom:
Author: michelleark
Issue: "7804"
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ def test__constraints_ddl(self, project, expected_sql):
)

results = run_dbt(["run", "-s", "+my_model"])
assert len(results) == 2
# assert at least my_model was run - additional upstreams may or may not be provided to the test setup via models fixture
assert len(results) >= 1
emmyoop marked this conversation as resolved.
Show resolved Hide resolved

# grab the sql and replace the model identifier to make it generic for all adapters
# the name is not what we're testing here anyways and varies based on materialization
Expand Down Expand Up @@ -481,7 +482,8 @@ def test__model_constraints_ddl(self, project, expected_sql):
)

results = run_dbt(["run", "-s", "+my_model"])
assert len(results) == 2
# assert at least my_model was run - additional upstreams may or may not be provided to the test setup via models fixture
assert len(results) >= 1
generated_sql = read_file("target", "run", "test", "models", "my_model.sql")
generated_sql_modified = _normalize_whitespace(generated_sql)
generated_sql_generic = _find_and_replace(
Expand Down