-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ebcaff
commit cbfb7f4
Showing
4 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "1" | ||
seed: 42 | ||
masking: | ||
- selector: | ||
jsonpath: "content" | ||
mask: | ||
xml: | ||
xpath: "note" | ||
masking: | ||
- selector: | ||
jsonpath: "@author" | ||
mask: | ||
template: "New Author Name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: XML masking features | ||
testcases: | ||
- name: replace target attribute value | ||
steps: | ||
- script: rm -f masking.yml | ||
- script: |- | ||
cat > masking.yml <<EOF | ||
version: "1" | ||
seed: 42 | ||
masking: | ||
- selector: | ||
jsonpath: "content" | ||
mask: | ||
xml: | ||
xpath: "note" | ||
injectParent: "title" | ||
masking: | ||
- selector: | ||
jsonpath: "@author" | ||
mask: | ||
template: "New Author Name" | ||
EOF | ||
- script: |- | ||
echo '{"title": "my blog note","content": "<note author='John Doe'><date>10/10/2023</date>This is a note of my blog....</note>"}' | pimo | ||
assertions: | ||
- result.code ShouldEqual 0 | ||
- result.systemout ShouldEqual {"title":"my blog note","content":"<note author='New Author Name'><date>10/10/2023</date>This is a note of my blog....</note>"} | ||
- result.systemerr ShouldBeEmpty |