Replies: 4 comments 3 replies
|
Hey @nevesb, which version of Benthos are you running? It's possible that this has been fixed as I've tried to reproduce it and it's working as intended, put an example up here: https://github.com/benthosdev/benthos/blob/main/config/test/env_var_stuff.yaml |
3 replies
|
Whoops, thanks for the feedback, I missed that it was the linting step before tests being applied causing it. I've disabled env var interpolation checks for unit tests: e62bceb |
0 replies
|
This still fails, if the variable is used somewhere in template where its absence would cause a wrong template. input:
http_client:
url: ${my_url_with_token}
verb: GET
processors:
- mapping: |
root = {"id": ${MYID}}
tests:
- name: input tokens
target_processors: '/input/processors'
environment:
my_url_with_token: http://dummyurl.com/
MYID: 123$ benthos test ./test.yaml
Test 'test.yaml' failed
Failures:
--- test.yaml ---
Lint: (8,31) expected query, got: }
exit status 1$ MYID=123 benthos test ./test.yaml
Test 'test.yaml' succeeded |
0 replies
|
Was this issue resolved? I am still seeing the same error while using the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello, I started using bethos a while ago and now I'm passing some parameters through environment variables. So for example I have this code snippet in my config:
When I run my tests now the following error message appears:
I tried to run configure my environment variable in several ways, for example:
But no way i put it, it accepts my variable. I think I'm using this field incorrectly. How should I put this?
All reactions