-
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
[Bug] Built-in unit tests: dbt ls --select
output is not usable with dbt test --select
#9895
Comments
@dbeatty10 did some digging here, and they all work as the expected except for unit tests. If we want to resolve this, we'd need to either:
Reprex
Output:
Try to list them each individually:
All of these return something except for the unit test node. To make it easier to see which are just the FQN and which have their selector prefix: FQN:
The last one (
|
Either of the proposed options is fine by me. I think the latter option ("add a new selection method for
Alternative idea (only because I had it): Should the |
^we are aligned that the option to "add a new selection method for |
@graciegoheen I added an implementation issue for this with acceptance criteria: |
Is this a new bug in dbt-core?
Current Behavior
To speed up running unit tests in CI, we split the list of unit tests over a number of workers. To do this, we first
dbt ls
the unit tests to generate the list of unit tests, then let each worker run a subset of the output. This has been working for our existing data tests as well as for tests written using thedbt-unit-testing
3rd party package.However, with the new built-in unit tests, the output of
dbt ls
doesn't seem to be usable bydbt test
. See repro steps below for details.Expected Behavior
I expect that the output of
dbt ls --select "test_type:unit"
can be passed todbt test --select
and it should work.Steps To Reproduce
Example setup:
List unit tests:
Run these unit tests:
Try to run without the
unit_test:
prefix:The above output also applies even if I try to account for the the fact that the unit test is in the
example
folder usingmy_repo.example.test_demo
, and also forexample.test_demo
.Only if I use just the test name, then it works:
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
bigquery
Additional Context
No response
The text was updated successfully, but these errors were encountered: