-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Test scripts accept payload filename argument
Closes #807 Signed-off-by: Patrick Kremer <[email protected]>
- Loading branch information
Patrick Kremer
committed
Feb 25, 2022
1 parent
19778c9
commit 40ae218
Showing
3 changed files
with
22 additions
and
3 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 |
---|---|---|
|
@@ -2,7 +2,16 @@ | |
|
||
# The ce-subject value should match the event router subject in function.yaml | ||
echo "Testing Function ..." | ||
curl [email protected] \ | ||
PAYLOAD_PATH="test-payload.json" | ||
if [ $# -gt 0 ]; then | ||
if test -f "$1"; then | ||
PAYLOAD_PATH=$1 | ||
else | ||
echo "$1 not found" | ||
exit 1 | ||
fi | ||
fi | ||
curl -d@$PAYLOAD_PATH \ | ||
-H "Content-Type: application/json" \ | ||
-H 'ce-specversion: 1.0' \ | ||
-H 'ce-id: d70079f9-fddd-4b7f-aa76-1193f28b0611' \ | ||
|