Skip to content

Commit 119f750

Browse files
author
Michael Myaskovsky
committed
fix clear tests
1 parent 16f18df commit 119f750

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

integration_tests/deprecated_tests/macros/e2e_tests/clear_tests.sql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{% macro clear_tests() %}
22
{% if execute %}
3-
{% do drop_schema(elementary.target_database(), target.schema) %}
3+
4+
{% set database_name = elementary.target_database() %}
5+
{% set schema_name = target.schema %}
6+
{% do elementary_integration_tests.drop_schema(database_name, schema_name) %}
47

58
{% set database_name, schema_name = elementary.get_package_database_and_schema('elementary') %}
6-
{% do drop_schema(database_name, schema_name) %}
9+
{% do elementary_integration_tests.drop_schema(database_name, schema_name) %}
710

811
{% set tests_schema_name = elementary.get_elementary_tests_schema(database_name, schema_name) %}
912
{% if tests_schema_name != schema_name %}
10-
{% do drop_schema(database_name, tests_schema_name) %}
13+
{% do elementary_integration_tests.drop_schema(database_name, tests_schema_name) %}
1114
{% else %}
1215
{{ elementary.edr_log("Tests schema is the same as the main elementary schema, nothing to drop.") }}
1316
{% endif %}
@@ -16,7 +19,7 @@
1619
{% endmacro %}
1720

1821
{% macro drop_schema(database_name, schema_name) %}
19-
{% do adapter.dispatch('drop_schema')(database_name, schema_name) %}
22+
{% do return(adapter.dispatch('drop_schema','elementary_integration_tests')(database_name, schema_name)) %}
2023
{% endmacro %}
2124

2225
{% macro default__drop_schema(database_name, schema_name) %}

0 commit comments

Comments
 (0)