[Feature] Sync unit tests with model enabled/disabled config #10193
Labels
enhancement
New feature or request
unit tests
Issues related to built-in dbt unit testing functionality
wontfix
Not a bug or out of scope for dbt-core
Is this your first time submitting a feature request?
Describe the feature
It would be nice to have the functionality where unit tests are synchronised with the corresponding model enabled/disabled config. This means that if a model is disabled, the corresponding unit tests for the model are also disabled. The unit test will be enabled or disabled depending on the config for the model it references to.
In the current release (v1.8.0) if a model with unit tests is set as disabled, the build will fail with the following error:
This behaviour also occurs even if the flag
--exclude-resource-type unit_test
is specified. The parser fails because it’s unable to find the model because it's disabled, even though the unit tests will not be executed.There is an ongoing issue [CT-3398] that it has already been proposed but it should be complementary.
Describe alternatives you've considered
No response
Who will this benefit?
DBT Users: It will make it easier to maintain unit tests associated to models.
Are you interested in contributing this feature?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: