Skip to content

Commit

Permalink
feat(executors): expose previous steps result (#452)
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <noreply@github.com>
lowlighter authored Nov 29, 2021
1 parent f997d8b commit fe3d592
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions process_testcase.go
Original file line number Diff line number Diff line change
@@ -270,6 +270,7 @@ func (v *Venom) runTestSteps(ctx context.Context, tc *TestCase) {
}

tc.computedVars.AddAll(assign)
tc.Vars.AddAll(tc.computedVars)
}
}

10 changes: 10 additions & 0 deletions tests/lib_custom/foobar_custom_multisteps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
executor: foobarcustommultisteps
input: {}
steps:
- script: echo "hello"
vars:
content:
from: result.systemout
- script: echo "{{.content}} world"
output:
foobar: "{{.result.systemout}}"
8 changes: 8 additions & 0 deletions tests/user_executor_custom_multisteps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: testsuite with a user executor in custom dir which has multiple steps
testcases:
- name: testfoobar multisteps custom
steps:
- type: foobarcustommultisteps
assertions:
- result.foobar ShouldEqual "hello world"

0 comments on commit fe3d592

Please sign in to comment.