[Bug]: CLI arguments are not being replaced in testing templates
See original GitHub issueWhat happened?
We are using JWTs for authentication. I am testing on macos (M1)
export JWT=$(genJwtToken) stepci workflow.yml -s JWT=$JWT && stepci workflow.yml -s JWT=$JWT {{env.JWT}} in the bearer/token section never gets replaced “sends to testing server [object object]” {{secrets.JWT}} in the bearer/token section never gets replaced “sends to testing server [object object]”
auth: bearer: token: {{secret.JWT}}
auth: bearer: token: {{secrets.JWT}}
Now I am using sed to transform the workflow in memory for JWT before running.
Love the tool. Also would love to know if I am doing something wrong as well.
What did you expect to happen?
I expected the test to pass . Trying to mirror tests out of swagger.
Version
2.4.5
Environment
v16.16
How can we reproduce this bug?
I started with the starting example.
Relevant log output
POST http://localhost:3000/schools/getRoster HTTP/1.1
Content-Type: application/json
Authorization: Bearer secrets.ABCJ
{"schoolId":"8eLtalPcqv5Ioae4E4Wn"}
Response
HTTP/1.1 403 Forbidden
x-powered-by: Express
access-control-allow-origin: *
content-type: application/json; charset=utf-8
content-length: 33
etag: W/"21-6WgjtJhAT2yQTa63ODczjQj9Xro"
date: Mon 07 Nov 2022 19:25:56 GMT
connection: close
{"message":"Could not authorize"}
Checks
S
Would you be interested in working on a bugfix for this issue?
- Yes! Assign me
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
TestComplete Command Line - SmartBear Support
If the /exit command-line argument is used without /run, then neither the specified project (project) suite will be run, nor will TestComplete be...
Read more >Windows is not passing command line arguments to Python ...
For Python 3.3 on Windows 7, my setting was under another registry key; the key I changed to make the arguments get passed...
Read more >Basic patterns and examples — pytest documentation
Pass different values to a test function, depending on command line options¶. Suppose we want to write a test that depends on a...
Read more >How do I resolve change set errors in CloudFormation? - AWS
1. Verify that you're including --resources-to-import in your AWS CLI command or ResourceToImport in your API call. Also, be sure to list all ......
Read more >Testing from the Command Line Interface
This topic explains how to run a test from the C++test command line interface ( cpptestcli ), which is described in Command Line...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That works.
Thanks, David
Update: I have changed the templating syntax, you now have to use
${{ }}
for templates