Skip to content

Commit e97b4ef

Browse files
committed
test: add databricks file_format delta test
Made-with: Cursor
1 parent e103756 commit e97b4ef

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""Tests for elementary monitor dbt_project configuration."""
2+
3+
import os
4+
5+
FILE_DIR = os.path.dirname(os.path.realpath(__file__))
6+
DBT_PROJECT_PATH = os.path.normpath(
7+
os.path.join(
8+
FILE_DIR,
9+
"..",
10+
"..",
11+
"..",
12+
"elementary",
13+
"monitor",
14+
"dbt_project",
15+
"dbt_project.yml",
16+
)
17+
)
18+
19+
20+
def test_databricks_target_uses_delta_file_format():
21+
"""When target.type is databricks, file_format should be delta."""
22+
with open(DBT_PROJECT_PATH) as f:
23+
content = f.read()
24+
assert "databricks" in content, "databricks must be in target.type condition for delta"
25+
assert "file_format" in content
26+
assert "delta" in content
27+
assert "spark" in content
28+
assert "fabricspark" in content

0 commit comments

Comments
 (0)