diff --git a/.changes/unreleased/Under the Hood-20250929-151159.yaml b/.changes/unreleased/Under the Hood-20250929-151159.yaml new file mode 100644 index 00000000000..d1020e9eddc --- /dev/null +++ b/.changes/unreleased/Under the Hood-20250929-151159.yaml @@ -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" diff --git a/tests/functional/partial_parsing/test_pp_schema_file_order.py b/tests/functional/partial_parsing/test_pp_schema_file_order.py index 666bc1c4877..950d4eadecc 100644 --- a/tests/functional/partial_parsing/test_pp_schema_file_order.py +++ b/tests/functional/partial_parsing/test_pp_schema_file_order.py @@ -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 = """ @@ -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 = """ @@ -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, } @@ -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"]) @@ -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")