Closed arbakker closed 3 years ago
Thanks for the PR! Could you please also adapt the failing test:
---- core::config_test::test_tera_error stdout ----
thread 'core::config_test::test_tera_error' panicked at 'assertion failed: `(left == right)`
left: `Some("Template error: Variable `env[\'UNDEFINED\']` not found in context while rendering \'inline.toml.tera\': the evaluated version was `env.UNDEFINED`. Maybe the index is out of bounds?")`,
right: `Some("Template error: Failed to render \'inline.toml.tera\'")`', t-rex-core/src/core/config_test.rs:98:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Sure! I missed the failing test 🤦 . I also changed the test case slightly, I assumed the env['UNDEFINED']
notation was from an earlier Tera version.
Nice to see the new CI tests running on a PR for the first time :-)
Could you remove the .vscode
files from the PR though?
Off course, I just removed the vs code files from the PR. Didn't mean to do commit those... Should I squash the commits in this PR, so not to pollute the commit history with this?
p.s. I see the CI test failing, but failing test is not related to the PR. Any idea why the tests are failing?
Please squash the commits to a single one.
I'm currently working on the CI in an other branch. The test seems to have been interrupted by other workflows.
Thanks for merging!
T-rex outputs a generic error message when the rendering of the configuration file fails. A typical error message is for instance:
With this fix t-rex outputs the errors from the Tera library, when the rendering fails. See for instance: