Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20250929-151159.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Update schema file order test
time: 2025-09-29T15:11:59.611595-04:00
custom:
Author: gshank
Issue: "11869"
17 changes: 13 additions & 4 deletions tests/functional/partial_parsing/test_pp_schema_file_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,16 @@ def test_more_schema_file_new_versions(self, project):
models:
- name: abcd
description: "abcd model"
versions:
- v: 1
- name: efgh
description: "efgh model"
versions:
- v: 1
- name: ijkl
description: "ijkl model"
versions:
- v: 1
"""

append_sources_yml = """
Expand All @@ -233,6 +239,8 @@ def test_more_schema_file_new_versions(self, project):
append_models_yml = """
- name: mnop
description: "mnop model"
versions:
- v: 1
"""

mnop_sql = """
Expand All @@ -245,9 +253,9 @@ class TestSourcesAndSchemaFiles:
def models(self):
return {
"sources.yml": sources_yml,
"abcd.sql": abcd_sql,
"efgh.sql": efgh_sql,
"ijkl.sql": ijkl_sql,
"abcd_v1.sql": abcd_sql,
"efgh_v1.sql": efgh_sql,
"ijkl_v1.sql": ijkl_sql,
"_models.yml": models_yml,
}

Expand All @@ -258,7 +266,7 @@ def test_schema_file_order_new_versions(self, project):
assert len(manifest.nodes) == 3

write_file(models_yml + append_models_yml, project.project_root, "models", "_models.yml")
write_file(mnop_sql, project.project_root, "models", "mnop.sql")
write_file(mnop_sql, project.project_root, "models", "mnop_v1.sql")
write_file(sources_yml + append_sources_yml, project.project_root, "models", "sources.yml")

manifest = run_dbt(["parse"])
Expand All @@ -268,3 +276,4 @@ def test_schema_file_order_new_versions(self, project):
# the patch updates, including description, so description will be ""
for node in manifest.nodes.values():
assert node.description == f"{node.name} model"
assert node.unique_id.endswith(".v1")
Loading