-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Summarize the feature in question.
Professionally test the sdf-tests jinja macros.
- validate jinja render as intended (and document explicit intentions)
- validate as sql queries
The sdf tool already excels at validating sql queries are correct, but I don't know how to wire it up.
What team(s) will benefit from this feature request?
Anybody who needs to test the jinja macros. Developer confidence in sdf-labs.
Is this an enhancement to an existing feature? If so, briefly describe the update.
Proposed tasks:
-
Add rust crate "sdf-tests" to the repository
-
add sdf-tests/src/unique.jinja and copy the unique macro to it. Repeat for all the macros in the sdf-tests workspace.
like this example:
-
in rust-project/tests/test_templates.rs, create a test harness inspired by this file (especially test_single at line 230)
https://github.com/mitsuhiko/minijinja/blob/670b67b967f273eab608ef1697e181dd5cfdc787/minijinja/tests/test_templates.rs -
build the crate
-
migrate test.jinja in the sdf project to 1 jinja file per macro
-
add a build script that exports from the txt files to jinja files in the sdf project. Are post-test scripts a thing in Cargo?
-
enhance the github workflow by adding a new step/s between git-clone and sdf-compile:
-- test the rust crate
-- run the build script to export the jinja to sdf-workspace.
--sdf compilefor all supported integration providers?
Describe alternatives you've considered if applicable.
Yee-haw!!
Additional context
Add any other context or screenshots about the feature request here.