[Bug] Built-in unit tests: dbt ls --select
output is not usable with dbt test --select
#9895
Labels
backport 1.8.latest
bug
Something isn't working
dbt tests
Issues related to built-in dbt testing functionality
High Severity
bug with significant impact that should be resolved in a reasonable timeframe
list
related to the dbt list command
pre-release
Bug not yet in a stable release
unit tests
Issues related to built-in dbt unit testing functionality
Milestone
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: