-
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.
feat: serve pimo via http server (#279)
* feat(serve): add command * feat(serve): add endpoint with payload * feat(serve): fix string problem * feat(serve): fix string problem * feat(serve): fix string problem * feat(serve): use option * feat(serve): venom test * feat(serve): fix venom test * feat(serve): update changelog * feat(serve): fix XIXO safe copy
- Loading branch information
1 parent
752f172
commit c0c663a
Showing
5 changed files
with
99 additions
and
20 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
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,28 @@ | ||
name: random features | ||
testcases: | ||
- name: mask on HTTP | ||
steps: | ||
- script: rm -f masking.yml | ||
- script: |- | ||
cat > masking.yml <<EOF | ||
version: "1" | ||
masking: | ||
- selector: | ||
jsonpath: "name" | ||
mask: | ||
randomChoice: | ||
- "Mickael" | ||
- "Mathieu" | ||
- "Marcel" | ||
EOF | ||
- type: exec | ||
script: | | ||
pimo -s 1 --serve :8080 & | ||
sleep 2 | ||
curl -X POST -H 'Content-Type: application/json' -d '{"name":"Toto"}' -s http://localhost:8080 | ||
kill %1 | ||
assertions: | ||
- result.code ShouldEqual 0 | ||
- result.systemout ShouldContainSubstring {"name":"Mickael"} | ||
- result.systemerr ShouldBeEmpty | ||
|