diff --git a/.changes/unreleased/Fixes-20230315-130504.yaml b/.changes/unreleased/Fixes-20230315-130504.yaml new file mode 100644 index 000000000..5229dca17 --- /dev/null +++ b/.changes/unreleased/Fixes-20230315-130504.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Fix failing test by removing no erroneous asserts. +time: 2023-03-15T13:05:04.747323-07:00 +custom: + Author: versusfacit + Issue: "605" diff --git a/tests/integration/persist_docs_tests/models-bigquery-nested/schema.yml b/tests/integration/persist_docs_tests/models-bigquery-nested/schema.yml index 0311dcb14..bf557cfbc 100644 --- a/tests/integration/persist_docs_tests/models-bigquery-nested/schema.yml +++ b/tests/integration/persist_docs_tests/models-bigquery-nested/schema.yml @@ -3,17 +3,9 @@ version: 2 models: - name: table_model_nested columns: - - name: level_1 - description: level_1 column description - - name: level_1.level_2 - description: level_2 column description - name: level_1.level_2.level_3_a description: level_3 column description - name: view_model_nested columns: - - name: level_1 - description: level_1 column description - - name: level_1.level_2 - description: level_2 column description - name: level_1.level_2.level_3_a - description: level_3 column description \ No newline at end of file + description: level_3 column description diff --git a/tests/integration/persist_docs_tests/test_persist_docs.py b/tests/integration/persist_docs_tests/test_persist_docs.py index 5079c035e..f2b5cc44f 100644 --- a/tests/integration/persist_docs_tests/test_persist_docs.py +++ b/tests/integration/persist_docs_tests/test_persist_docs.py @@ -138,6 +138,8 @@ def test_bigquery_persist_docs(self): colunmn descriptions are persisted on the test model table and view. Next, generate the catalog and check if the comments are also included. + + Note: dbt-bigquery does not allow comments on models with children nodes """ self.run_dbt(['seed']) self.run_dbt() @@ -162,13 +164,7 @@ def test_bigquery_persist_docs(self): bq_schema = client.get_table(table_id).schema level_1_field = bq_schema[0] - assert level_1_field.description == \ - "level_1 column description" - level_2_field = level_1_field.fields[0] - assert level_2_field.description == \ - "level_2 column description" - level_3_field = level_2_field.fields[0] assert level_3_field.description == \ "level_3 column description" @@ -176,12 +172,6 @@ def test_bigquery_persist_docs(self): # check the descriptions in the catalog node = catalog_data['nodes']['model.test.{}'.format(node_id)] - level_1_column = node['columns']['level_1'] - assert level_1_column['comment'] == "level_1 column description" - - level_2_column = node['columns']['level_1.level_2'] - assert level_2_column['comment'] == "level_2 column description" - level_3_column = node['columns']['level_1.level_2.level_3_a'] assert level_3_column['comment'] == "level_3 column description"