question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: CLI arguments are not being replaced in testing templates

See original GitHub issue

What 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:closed
  • Created 10 months ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dstrickland67commented, Nov 7, 2022

That works.

Thanks, David

0reactions
mishushakovcommented, Nov 17, 2022

Update: I have changed the templating syntax, you now have to use ${{ }} for templates

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found