Skip to content

Commit f645843

Browse files
authored
Restructure the testing resources (#198)
Signed-off-by: Yu Ishikawa <yu-iskw@users.noreply.github.com>
1 parent 6e181be commit f645843

File tree

26 files changed

+120
-85
lines changed

26 files changed

+120
-85
lines changed

tests/parsers/test_utils.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,24 @@ class TestDbtUtils:
104104
)
105105
def test_get_dbt_schema_version(self, version, artifacts):
106106
for file, expected_dbt_schema_version in artifacts.items():
107+
# Determine the subdirectory based on file type
108+
if file == "catalog.json":
109+
subdirectory = "catalog"
110+
elif file == "manifest.json":
111+
subdirectory = "manifest"
112+
elif file == "run_results.json":
113+
subdirectory = "run_results"
114+
else:
115+
subdirectory = version # fallback, though shouldn't happen
116+
107117
path = os.path.join(
108-
get_project_root(), "tests", "resources", version, "jaffle_shop", file
118+
get_project_root(),
119+
"tests",
120+
"resources",
121+
subdirectory,
122+
version,
123+
"jaffle_shop",
124+
file,
109125
)
110126
with open(path, "r", encoding="utf-8") as fp:
111127
artifact_json = json.load(fp)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/resources/v12/jaffle_shop/manifest_1.10.json renamed to tests/resources/manifest/v12/jaffle_shop/manifest_1.10.json

File renamed without changes.

tests/resources/v12/jaffle_shop/manifest_1.8.json renamed to tests/resources/manifest/v12/jaffle_shop/manifest_1.8.json

File renamed without changes.

tests/resources/v12/jaffle_shop/manifest_1.9.json renamed to tests/resources/manifest/v12/jaffle_shop/manifest_1.9.json

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)