From 58bf699f3d192c0287495a1ee2e31f2430a4438a Mon Sep 17 00:00:00 2001 From: jeremyyeo Date: Mon, 16 May 2022 21:43:47 +1200 Subject: [PATCH] modify test with casing --- integration_tests/models/sql/schema.yml | 21 ++++++++++++------- .../models/sql/test_union_exclude.sql | 4 ---- ... => test_union_exclude_base_lowercase.sql} | 0 .../sql/test_union_exclude_base_uppercase.sql | 8 +++++++ .../sql/test_union_exclude_lowercase.sql | 4 ++++ .../sql/test_union_exclude_uppercase.sql | 4 ++++ 6 files changed, 29 insertions(+), 12 deletions(-) delete mode 100644 integration_tests/models/sql/test_union_exclude.sql rename integration_tests/models/sql/{test_union_exclude_base.sql => test_union_exclude_base_lowercase.sql} (100%) create mode 100644 integration_tests/models/sql/test_union_exclude_base_uppercase.sql create mode 100644 integration_tests/models/sql/test_union_exclude_lowercase.sql create mode 100644 integration_tests/models/sql/test_union_exclude_uppercase.sql diff --git a/integration_tests/models/sql/schema.yml b/integration_tests/models/sql/schema.yml index b8f664112..e5e56897e 100644 --- a/integration_tests/models/sql/schema.yml +++ b/integration_tests/models/sql/schema.yml @@ -12,43 +12,43 @@ models: tests: - accepted_values: values: - - '1' + - "1" - name: count_b tests: - accepted_values: values: - - '1' + - "1" - name: count_c tests: - accepted_values: values: - - '1' + - "1" - name: count_d tests: - accepted_values: values: - - '1' + - "1" - name: count_e tests: - accepted_values: values: - - '1' + - "1" - name: count_f tests: - accepted_values: values: - - '1' + - "1" - name: count_g tests: - accepted_values: values: - - '5' + - "5" - name: test_get_column_values_where tests: @@ -163,7 +163,12 @@ models: tests: - dbt_utils.not_constant - - name: test_union_exclude + - name: test_union_exclude_lowercase + tests: + - dbt_utils.equality: + compare_model: ref('data_union_exclude_expected') + + - name: test_union_exclude_uppercase tests: - dbt_utils.equality: compare_model: ref('data_union_exclude_expected') diff --git a/integration_tests/models/sql/test_union_exclude.sql b/integration_tests/models/sql/test_union_exclude.sql deleted file mode 100644 index f3bbbec1e..000000000 --- a/integration_tests/models/sql/test_union_exclude.sql +++ /dev/null @@ -1,4 +0,0 @@ -select - {{ dbt_utils.star(ref("test_union_exclude_base"), except=["_dbt_source_relation"]) }} - -from {{ ref("test_union_exclude_base") }} diff --git a/integration_tests/models/sql/test_union_exclude_base.sql b/integration_tests/models/sql/test_union_exclude_base_lowercase.sql similarity index 100% rename from integration_tests/models/sql/test_union_exclude_base.sql rename to integration_tests/models/sql/test_union_exclude_base_lowercase.sql diff --git a/integration_tests/models/sql/test_union_exclude_base_uppercase.sql b/integration_tests/models/sql/test_union_exclude_base_uppercase.sql new file mode 100644 index 000000000..af3dc3fa0 --- /dev/null +++ b/integration_tests/models/sql/test_union_exclude_base_uppercase.sql @@ -0,0 +1,8 @@ + +{{ dbt_utils.union_relations( + relations=[ + ref('data_union_table_1'), + ref('data_union_table_2'), + ], + exclude=['NAME'] +) }} diff --git a/integration_tests/models/sql/test_union_exclude_lowercase.sql b/integration_tests/models/sql/test_union_exclude_lowercase.sql new file mode 100644 index 000000000..95efc06ad --- /dev/null +++ b/integration_tests/models/sql/test_union_exclude_lowercase.sql @@ -0,0 +1,4 @@ +select + {{ dbt_utils.star(ref("test_union_exclude_base_lowercase"), except=["_dbt_source_relation"]) }} + +from {{ ref("test_union_exclude_base_lowercase") }} diff --git a/integration_tests/models/sql/test_union_exclude_uppercase.sql b/integration_tests/models/sql/test_union_exclude_uppercase.sql new file mode 100644 index 000000000..3e0ab4f95 --- /dev/null +++ b/integration_tests/models/sql/test_union_exclude_uppercase.sql @@ -0,0 +1,4 @@ +select + {{ dbt_utils.star(ref("test_union_exclude_base_uppercase"), except=["_DBT_SOURCE_RELATION"]) }} + +from {{ ref("test_union_exclude_base_uppercase") }}