[Bug] unit tests cannot be run if config block includes a call to var() #11204
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
unit tests
Issues related to built-in dbt unit testing functionality
Is this a new bug in dbt-core?
Current Behavior
If the model's config block includes a call to
var()
as we do in our case to optionally prefix the output schema, unit test always fail with message:'var' is undefined. This can happen when calling a macro that does not exist.
Also when I tried to define var in unit test overrides
Expected Behavior
Unit test should run normally
Steps To Reproduce
model:
yml (unit tests):
Relevant log output
Environment
Which database adapter are you using with dbt?
bigquery
Additional Context
full test project for reproducing
dbt_test.tar.gz
The text was updated successfully, but these errors were encountered: