5454 ENV_KEY1 : value1
5555 ENV_KEY2 : value2
5656
57- # Any value that starts with '#!/ ' (i.e. #!/bin/bash) will be written to disk as
57+ # Any value that starts with '#!' (i.e. #!/bin/bash) will be written to disk as
5858# an executable script file and the resulting output combined from stdout & stderr
5959# will become the final evaluated value. This is useful if you chain http calls,
6060# such as, the url of the second test is from the payload response of the first
6161# test, etc.
62+ #
6263# If supported, the filename of the script will be indicated below.
64+ #
65+ # At the moment, shell interpreters (that works with `bin -c scriptfile` command is
66+ # supported. Also, Python is supported as well by using the shebang:
67+ # #!/path/to/python/binary
6368
6469# A script to run before anything else. A non-zero return value indicates a failure.
6570# Filename: <tempdir>/<scenario-filename>.yaml_prepare
100105 {"key1":"value1","key2":"value2"}
101106
102107 # If response payload is not empty, its contents will be written in the
103- # file below. Useful if you want to refer to it under 'asserts.shell '
108+ # file below. Useful if you want to refer to it under 'asserts.script '
104109 # and/or 'check'.
105110 response_out : /tmp/out.json
106111
118123 }
119124
120125 # A non-zero return value indicates a failure.
121- # Filename: <tempdir>/<scenario-filename>.yaml_run<index>_assertshell
122- # Example: /tmp/scenario01.yaml_run0_assertshell
123- shell : |
126+ # Filename: <tempdir>/<scenario-filename>.yaml_run<index>_assertscript
127+ # Example: /tmp/scenario01.yaml_run0_assertscript
128+ script : |
124129 #!/bin/bash
125130 if [[ "$(cat /tmp/out.json | jq -r .username)" != "user01" ]]; then
126131 echo "try fail"
@@ -144,7 +149,7 @@ Example [scenario files](https://github.com/flowerinthenight/oops/tree/master/ex
144149PR's are welcome!
145150- [ ] Parsing and assertions for response JSON payloads
146151- [ ] Labels/tags for filtering what tests to run
147- - [ ] Support for other scripting engines other than ` bash/sh`, i.e. Jinja
152+ - [x ] Support for other scripting engines other than ` bash/sh`, i.e. Python
148153- [ ] Store reports to some storage, i.e. S3, GCS, etc.
149154- [ ] Support for AKS + Service Bus
150155- [ ] Possibility of running as a service?
0 commit comments