-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support 'outputs' in tests and steps
Allow users to define 'outputs' at the step and test levels, which is a map (like 'env') that is interpolated last, after the 'run' command is executed and checked by 'expect' conditions. Having 'outputs' facilitates cleaner reuse of computed values and comparison of values across containers without resorting to writing temp files and/or using ':host'. 'outputs' are always interpolated, even if the test/step has failed, to allow users to inspect/react to issues (ex: using stderr) in subsequent tests/steps. 'outputs' would only be skipped if the step 'if' is false. Besides the addition of the new 'outputs' key, we allow adding 'id' to steps and add two new contexts, 'tests' and 'steps', which represent the previously completed tests and steps respectively. The 'tests' context and the 'depends' key are analogous to 'needs' in GitHub Actions; however, we currently do not check that a user expression that references a test with 'tests' also includes that test in their 'depends' graph. If a user references a non-existent test or non-existent output, they get null (not an exception). Due to our "in place" interpolation of tests and steps, we need to clear uninterpolated 'outputs' in the case the test/step was skipped, so that future tests/steps don't observe uninterpolated strings as 'outputs'. Future refactoring of how tests/steps are interpolated will hopefully make this unnecessary.
- Loading branch information
Showing
11 changed files
with
182 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters