Closed amraupward closed 6 months ago
Hi @amraupward.
runn does not support .env file.
It can be used by setting the environment variable.
$ export UUID=blahblahblah
$ runn run path/to/scenario.yaml
desc: ロケーション設定取得サービステスト
interval: 2
runners:
greq: grpc://localhost:9005
vars:
ORGUUID: ${ORGUUID}
steps:
- desc: ロケーション設定取得
greq:
settingService/getSettings:
message:
owner:
orgUUID: {{ vars.ORGUUID }}
test: |
current.res.status == 0
&& len(current.res.message) > 0
&& len(current.res.message['settings']) > 0
&& upper(current.res.message['settings'][0]['orgUUID']) == {{ vars.ORGUUID }}
this scenario.yaml I runnig with below command
USER=hello-k1low-good-runn-tools runn run scenario-local.yaml --grpc-no-tls --grpc-proto "$PROTO_FILE_NAME" --format json --verbose > result
but not working.
it's syntax error when execute. that message.owner.orgUUID can't get {{ vars.ORGUUID }}
how to solve this. i tried too many times. but still error occuring. HELP K1low :)
It seems that the way the variables are retrieved is incorrect.
- && upper(current.res.message['settings'][0]['orgUUID']) == {{ vars.ORGUUID }}
+ && upper(current.res.message['settings'][0]['orgUUID']) == vars.ORGUUID
If you find runn difficult, We recommend https://zenn.dev/katzumi/books/runn-tutorial 📖 👍
.env file in UUID=blahblahblah
scenario.yaml
how to get UUID value from .env in scenario.yaml