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 generic test not null and unique custom configs #11208

Merged
merged 6 commits into from
Jan 15, 2025

Conversation

gshank
Copy link
Contributor

@gshank gshank commented Jan 10, 2025

Resolves #

Problem

When the ability to have custom configs in generic tests was added, it missed the special code for handling not_null and unique tests.

Solution

Access "config" from the test builder instead of "get_static_config"

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@gshank gshank requested a review from a team as a code owner January 10, 2025 20:24
@cla-bot cla-bot bot added the cla:yes label Jan 10, 2025
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.87%. Comparing base (b414ef2) to head (e0abd4c).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11208      +/-   ##
==========================================
- Coverage   88.93%   88.87%   -0.06%     
==========================================
  Files         187      187              
  Lines       24104    24041      -63     
==========================================
- Hits        21436    21367      -69     
- Misses       2668     2674       +6     
Flag Coverage Δ
integration 86.18% <100.00%> (-0.14%) ⬇️
unit 62.47% <0.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.47% <0.00%> (+0.07%) ⬆️
Integration Tests 86.18% <100.00%> (-0.14%) ⬇️

@@ -104,7 +104,7 @@ def test_env_vars_models(self, project):
schema_file = manifest.files[source.file_id]
test_id = "test.test.source_not_null_seed_sources_raw_customers_id.e39ee7bf0d"
test_node = manifest.nodes[test_id]
assert test_node.config.severity == "WARN"
assert test_node.config.severity == "warn"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will these casing changes show up in output artifacts? If so what do you think the impact could be?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only generic tests which had the severity changed from "warn" to "WARN" were the specially-handled not_null and unique tests. All of the other generic tests did not do the uppercasing. So I don't think the impact would be much.

@gshank gshank merged commit 3de3b82 into main Jan 15, 2025
54 of 56 checks passed
@gshank gshank deleted the fix_not_null_unique_configs branch January 15, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants