We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hello, with pimo 1.14.0
this venom test is failling
- name: fromjson sourcefield with string value steps: - script: rm -rf masking.yml - script: |- cat > masking.yml <<EOF version: "1" masking: - selector: jsonpath: "targetfield" mask: fromjson: "sourcefield" EOF echo '{"sourcefield": "value"}' | pimo assertions: - result.code ShouldEqual 0 - result.systemout ShouldEqual {"sourcefield":"value","targetfield":"value"} - result.systemerr ShouldBeEmpty
as far as i understand the fromjson mask, it works if sourcefield's type is bool, float but not if its a string.
The text was updated successfully, but these errors were encountered:
fromjson mask try to parse field content as a JSON value.
fromjson
a valid JSON value must be :
3.14
-1
42
true
false
"I am a string with double quotes at the beginning and at the end "
[1,2,3]
{ "key" : "value"}
Your test should be :
- name: fromjson sourcefield with string value steps: - script: rm -rf masking.yml - script: |- cat > masking.yml <<EOF version: "1" masking: - selector: jsonpath: "targetfield" mask: fromjson: "sourcefield" EOF echo '{"sourcefield": "\"value\""}' | pimo assertions: - result.code ShouldEqual 0 - result.systemout ShouldEqual {"sourcefield":"\"value\"","targetfield":"value"} - result.systemerr ShouldBeEmpty
Sorry, something went wrong.
thank you @youen, i added some escaped double quotes in my dataset and the fromjson mask is working now ;)
No branches or pull requests
hello,
with pimo 1.14.0
this venom test is failling
as far as i understand the fromjson mask, it works if sourcefield's type is bool, float but not if its a string.
The text was updated successfully, but these errors were encountered: