Skip to content

Commit

Permalink
Add test for unit-test tags issue
Browse files Browse the repository at this point in the history
  • Loading branch information
psousa50 committed Jul 6, 2023
1 parent 3fc4623 commit 69330a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions integration-tests/macros/macro_with_ref.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% macro macro_with_ref() %}
{% set dummy = dbt_unit_testing.ref('model_a') %}
{% endmacro %}
2 changes: 1 addition & 1 deletion macros/tests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
{% endmacro %}

{% macro running_unit_test() %}
{{ return (config.get('tags') and 'unit-test' in config.get('tags')) }}
{{ return ('unit-test' in config.get('tags', {})) }}
{% endmacro %}

{% macro ref_tested_model(model_name) %}
Expand Down
2 changes: 2 additions & 0 deletions run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ if [[ ! -e ~/.dbt/profiles.yml ]]; then
cp ci/profiles.yml ~/.dbt/profiles.yml
fi

dbt run-operation macro_with_ref --target "$PROFILE"

dbt deps --target "$PROFILE"

# create seeds in the database
Expand Down

0 comments on commit 69330a1

Please sign in to comment.