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

Fix configuration of turning test warnings into failures #9347

Merged
merged 5 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240108-232035.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: fix configuration of turning test warnings into failures with WARN_ERROR_OPTIONS
time: 2024-01-08T23:20:35.339102+09:00
custom:
Author: jx2lee
Issue: "7761"
2 changes: 1 addition & 1 deletion core/dbt/task/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def execute(self, test: TestNode, manifest: Manifest):
message = f"Got {num_errors}, configured to fail if {test.config.error_if}"
failures = result.failures
elif result.should_warn:
if get_flags().WARN_ERROR:
if get_flags().WARN_ERROR or get_flags().WARN_ERROR_OPTIONS.includes("LogTestResult"):
MichelleArk marked this conversation as resolved.
Show resolved Hide resolved
status = TestStatus.Fail
message = f"Got {num_errors}, configured to fail if {test.config.warn_if}"
else:
Expand Down