-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
spike unit test versions #9302
base: main
Are you sure you want to change the base?
spike unit test versions #9302
Conversation
Co-authored-by: Michelle Ark <michelle.ark@dbtlabs.com>
* WIP * remove breakpoint * fix tests, fix schema
* use unit test name as top level * remove breakpoints * finish converting tests * fix unit test node name * breakpoints * fix partial parsing bug * comment out duplicate test * fix test and make unique id match other uniqu id patterns * clean up * fix incremental test * Update tests/functional/unit_testing/test_unit_testing.py
* WIP * adding tests * fix tests * more tests * fix broken tests * fix broken tests * change to csv extension * fix unit test yaml * add mixed inline and file csv test * add mixed inline and file csv test * additional changes * read file directly * some cleanup and soem test fixes - wip * fix test * use better file searching * fix final test * cleanup * use absolute path and fix tests
* Add unit tests to state:modified selection * Get defer working too yolo * Refactor per marky suggestion * Add changelog * separate out unit test state tests + fix csv fixture tests * formatting * detect changes to fixture files with state:modified --------- Co-authored-by: Michelle Ark <michelle.ark@dbtlabs.com>
…-core into unit_testing_feature_branch
* Switch to using 'test' command instead of 'unit-test' * Remove old unit test * Put daff changes into task/test.py * changie * test_type:unit * Add unit test to build and make test * Select test_type:data * Add unit tets to test_graph_selector_methods.py * Fix fqn to incude path components * Update build test * Remove part of message in test_csv_fixtures.py that's different on Windows * Rename build test directory
* convert test to data_test * generate proto types * fixing tests * add tests * add more tests * test cleanup * WIP * fix graph * fix testing manifest * set resource type back to test and reset unique id * reset expected run results * cleanup * changie * modify to only look for tests under columns in schema files * stop using dashes
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. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## unit_testing_feature_branch #9302 +/- ##
===============================================================
- Coverage 86.88% 80.26% -6.62%
===============================================================
Files 223 223
Lines 27657 27865 +208
===============================================================
- Hits 24029 22367 -1662
- Misses 3628 5498 +1870
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5e98353
to
8fbbb65
Compare
8fbbb65
to
56dfb34
Compare
resolves #8799
Problem
Unit tests do not account for model versions.
Solution
Add functionality to
Since the model versions are defined in the schema files we don't have this until the end of parsing. We need to patch unit tests to be able to determine what versions of the model needs to be unit tested.
This PR is a first pass at that. It fails in partial parsing because the unique ids have been modified to include the model version but when we're partial parsing we don't know the versions yet so it doesn't recognize them. When the model names is changed, it currently continues to run the old unit test and just adds a new unit test with a new name.
Checklist