Add a new selection method for `unit_test:`
dbeatty10 opened this issue · 1 comments
dbeatty10 commented
^we are aligned that the option to "add a new selection method for
unit_test:
" is the preferred solution!
Originally posted by @graciegoheen in #9895 (comment)
Housekeeping
- I am a maintainer of dbt-core
Short description
There should be a selection method for unit tests (unit_test:
), and the output of dbt ls
should be usable with dbt test --select {unit test selection method}
.
Acceptance criteria
- Output of
dbt list
still includes:unit_test:my_project.my_unit_test
- Output of
dbt ls --select unit_test:my_project.my_unit_test
includes:unit_test:my_project.my_unit_test
dbt run --select unit_test:my_project.my_unit_test
does nothingdbt test --select unit_test:my_project.my_unit_test
executes a single node -- the unit testdbt build --select unit_test:my_project.my_unit_test
executes a single node -- the unit test- PR resolves and closes both #9895 and #10053
- e.g., if the PR description includes
resolves #9895 resolves #10053
, it will accomplish that goal.
- e.g., if the PR description includes
- Confirm that the
user docs
label opens an issue in the docs.getdbt.com repo- Update the docs issue with enough information for this feature to be documented (syntax example(s) and link to the docs page to be updated).
Suggested Tests
Although the following two proposed tests cover independent expected behaviors, they can be combined into a single test if desired.
Test 1
dbt list --select {mode_name} --output json --quiet
- Parse the output as JSON-L
- Confirm there is just a single item and it has the expected
unique_id
value
Test 2
Do the following steps:
dbt list --select {mode_name} --output json --quiet
- Parse the output as JSON-L
- For each item in the result, confirm the following has the expected result:
dbt test --select {unique_id}
Impact to Other Teams
Unknown.
Will backports be required?
No.
Context
FishtownBuildBot commented
Opened a new issue in dbt-labs/docs.getdbt.com: dbt-labs/docs.getdbt.com#5468