-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test case interpolation incorrectly replaces "-" with "µµµ" #475
Labels
Comments
Thanks for the detailed report. I will make a PR on venom once the PR above will be merged on master branch |
fsamin
added a commit
that referenced
this issue
Dec 27, 2021
closes #475 Signed-off-by: francois samin <[email protected]>
fsamin
added a commit
that referenced
this issue
Dec 27, 2021
closes #475 Signed-off-by: francois samin <[email protected]>
fsamin
added a commit
that referenced
this issue
Dec 27, 2021
closes #475 Signed-off-by: francois samin <[email protected]>
fsamin
added a commit
that referenced
this issue
Dec 27, 2021
closes #475 Signed-off-by: francois samin <[email protected]>
Awesome! Thanks, @fsamin! 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
String interpolation seems to break in a very specific edge-case.
I've been able to create a minimal test suite to reproduce the problem in Venom 1.0.0, 1.0.1, and the latest from
master
(1.0.0-rc.7 and older don't have this issue):This yields the following result:
A few things to note:
UseVar
testcase, there are 2 steps defined. They both execute the same HTTP request, but look at different headers from the result.acceptµµµranges
header, which is incorrect.{{ .GetVar.accept }}
with{{ .accept }}
(which is defined in thevars
key at the top), everything works fine.In our codebase we use this pattern to execute a login request to generate a JWT token at the beginning of the suite, which we then use as a
Authorization
header in subsequent testcases.I've tried to debug this a little bit, and was able to trace back the string interpolation to the following function:
https://github.com/ovh/cds/blob/c80557c58fbb2fc28af3da94385172abefddc9fc/sdk/interpolate/interpolate.go#L49
The
Do
function yield different output for both test cases when it's called from: https://github.com/ovh/venom/blob/master/process_testcase.go#L209I'm not really sure where to go from here, because both test cases have similar raw input, yet a very different
vars
slice. My hunch is that something in thevars
slice trips up the interpolation function?The text was updated successfully, but these errors were encountered: