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

[Backport 1.5.latest] generalize BaseModelConstraintsRuntimeEnforcement #7852

Merged
merged 2 commits into from
Jun 14, 2023
Merged
Changes from all commits
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
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

# 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