Skip to content

Commit

Permalink
skip test that raises exception intentionally, fix other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db committed Mar 5, 2025
1 parent c938e85 commit ab93fd6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tests/functional/adapter/views/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
models:
- name: initial_view
description: "This is a view"
tblproperties:
config:
tblproperties:
key: value
tags:
databricks_tags:
tag1: value1
columns:
- name: id
Expand Down
17 changes: 15 additions & 2 deletions tests/functional/adapter/views/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_view_update_with_description(self, project):
util.run_dbt(["run"])

results = project.run_sql(
f"describe extended {project.database}.{project.test_schema}.initial_view",
"describe extended {database}.{schema}.initial_view",
fetch="all",
)
for row in results:
Expand All @@ -34,12 +34,25 @@ def test_view_update_with_query(self, project):
util.run_dbt(["run"])

results = project.run_sql(
f"select * from {project.database}.{project.test_schema}.initial_view",
"select * from {database}.{schema}.initial_view",
fetch="all",
)
assert results[0] == Row([1], ["id"])

def test_view_update_tblproperties(self, project):
util.run_dbt(["build"])
schema_2 = fixtures.schema_yml.replace("key: value", "key: value2")
util.write_file(schema_2, "models", "schema.yml")
util.run_dbt(["run"])

results = project.run_sql(
"show tblproperties {database}.{schema}.initial_view",
fetch="all",
)
assert results[0][1] == "value2"


@pytest.mark.skip_profile("databricks_cluster")
class TestUpdateViewViaAlter(BaseUpdateView):
@pytest.fixture(scope="class")
def project_config_update(self):
Expand Down

0 comments on commit ab93fd6

Please sign in to comment.