Skip to content

test(shell): add outputFilesPebbleExpression test#360

Open
fdelbrayelle wants to merge 2 commits intomainfrom
test/output-files-pebble-expression
Open

test(shell): add outputFilesPebbleExpression test#360
fdelbrayelle wants to merge 2 commits intomainfrom
test/output-files-pebble-expression

Conversation

@fdelbrayelle
Copy link
Copy Markdown
Member

@fdelbrayelle fdelbrayelle commented Apr 27, 2026

⚠️ To merge once this PR is backported to releases/v1.3.x.

Summary

Adds outputFilesPebbleExpression test to ScriptTest to lock in the contract that {{ outputFiles.name }} resolves to the correct absolute path inside a Shell Script body.

This is the plugin-scripts counterpart to kestra-io/kestra#13765 / kestra-io/kestra#15725 (the core fix). The test will not pass in CI until kestraVersion in gradle.properties is bumped to a version that includes the core fix.

Test logic:

  • Declares outputFiles: ["outfile"]
  • Uses Property.ofExpression() for the script body so Pebble rendering runs (simulates YAML deserialization)
  • Body: echo -n {{ outputFiles.outfile }} > outfile — writes the resolved path to the file
  • Asserts the file content ends with /outfile (i.e., the Pebble expression resolved to the working-dir path)

Test plan

  • ./gradlew :plugin-script-shell:test --tests "*ScriptTest.outputFilesPebbleExpression*" passes after kestraVersion bump
  • Existing shell script tests remain green

Locks in the contract that {{ outputFiles.name }} resolves to the
correct absolute path inside a Script body, as fixed in kestra-io/kestra#13765.

Requires a kestraVersion bump to pick up the core fix before this
test can pass in CI.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

🧪 Java Unit Tests

TestsPassed ❌️SkippedFailedTime ⏱
Java Tests Report0 ran0 ✅0 ⚠️0 ❌

@fdelbrayelle fdelbrayelle self-assigned this Apr 27, 2026
@fdelbrayelle fdelbrayelle force-pushed the test/output-files-pebble-expression branch from 7371ad8 to 3262a07 Compare April 28, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants