-
Notifications
You must be signed in to change notification settings - Fork 79
Description
I am resuing below code to do unit testing on my models present in dbt.
I used this package - https://github.com/EqualExperts/dbt-unit-testing/
when I run below mentioned command I can see message " The selection criterion 'tag:unit-tests' does not match any nodes" in system logs and nothing happens.
please help me to figure out what going wrong here
code present in tests.sql inside folder tests/unit
{{
config(
tags=['unit-test','unit-tests']
)
}}
{% call dbt_unit_testing.test('customers', 'should show customer name') %}
{% call dbt_unit_testing.mock_ref ('stg_customers') %}
select null::Numeric as customer_id, 'John' as first_name, 'Doe' as last_name
{% endcall %}
{% call dbt_unit_testing.mock_ref ('stg_orders') %}
select null::numeric as customer_id, null::numeric as order_id, null as order_date where false
{% endcall %}
{% call dbt_unit_testing.mock_ref ('stg_payments') %}
select null::numeric as order_id, null::numeric as amount where false
{% endcall %}
{% call dbt_unit_testing.expect() %}
select null::Numeric as customer_id, 'John' as first_name, 'Doe' as last_name
{% endcall %}
{% endcall %}
command--
dbt test --select "tag:unit-tests"