Skip to content

Commit d7aff80

Browse files
Merge pull request #812 from elementary-data/ele-4399-fix-clear-tests
Ele 4399 fix clear tests
2 parents 16f18df + 7418d22 commit d7aff80

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

integration_tests/deprecated_tests/macros/e2e_tests/clear_tests.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
{% macro clear_tests() %}
22
{% if execute %}
3-
{% do drop_schema(elementary.target_database(), target.schema) %}
3+
{% do elementary_integration_tests.edr_drop_schema(elementary.target_database(), target.schema) %}
44

55
{% set database_name, schema_name = elementary.get_package_database_and_schema('elementary') %}
6-
{% do drop_schema(database_name, schema_name) %}
6+
{% do elementary_integration_tests.edr_drop_schema(database_name, schema_name) %}
77

88
{% set tests_schema_name = elementary.get_elementary_tests_schema(database_name, schema_name) %}
99
{% if tests_schema_name != schema_name %}
10-
{% do drop_schema(database_name, tests_schema_name) %}
10+
{% do elementary_integration_tests.edr_drop_schema(database_name, tests_schema_name) %}
1111
{% else %}
1212
{{ elementary.edr_log("Tests schema is the same as the main elementary schema, nothing to drop.") }}
1313
{% endif %}
1414
{% endif %}
1515
{{ return('') }}
1616
{% endmacro %}
1717

18-
{% macro drop_schema(database_name, schema_name) %}
19-
{% do adapter.dispatch('drop_schema')(database_name, schema_name) %}
18+
{% macro edr_drop_schema(database_name, schema_name) %}
19+
{% do return(adapter.dispatch('edr_drop_schema','elementary_integration_tests')(database_name, schema_name)) %}
2020
{% endmacro %}
2121

22-
{% macro default__drop_schema(database_name, schema_name) %}
22+
{% macro default__edr_drop_schema(database_name, schema_name) %}
2323
{% set schema_relation = api.Relation.create(database=database_name, schema=schema_name) %}
2424
{% do dbt.drop_schema(schema_relation) %}
2525
{% do adapter.commit() %}
2626
{% do elementary.edr_log("dropped schema {}".format(schema_relation | string)) %}
2727
{% endmacro %}
2828

29-
{% macro clickhouse__drop_schema(database_name, schema_name) %}
29+
{% macro clickhouse__edr_drop_schema(database_name, schema_name) %}
3030
{% set results = run_query("SELECT name FROM system.tables WHERE database = '" ~ database_name ~ "'") %}
3131
{% if execute %}
3232
{% for row in results %}

0 commit comments

Comments
 (0)