-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DXCDT-741 Add tests for creating custom email provider
- Loading branch information
Showing
4 changed files
with
47 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,23 +7,31 @@ tests: | |
command: auth0 email provider delete --force | ||
exit-code: 0 | ||
|
||
002 - create email provider: | ||
command: auth0 email provider create --provider=mandrill --enabled=false --default-from-address='[email protected]' --credentials='{"api_key":"some-api-key"}' --settings='{}' | ||
002 - create custom email provider action: | ||
command: ./test/integration/scripts/create-custom-email-action.sh | ||
exit-code: 0 | ||
|
||
003 - create custom email provider: | ||
command: auth0 email provider create --provider=custom --enabled=true --default-from-address='[email protected]' | ||
exit-code: 0 | ||
|
||
003 - delete up email provider: | ||
004 - delete email provider: | ||
command: auth0 email provider delete --force | ||
exit-code: 0 | ||
|
||
004 - it doesn't show the email provider: | ||
005 - it doesn't show the email provider: | ||
command: auth0 email provider show | ||
exit-code: 1 | ||
|
||
005 - create email provider: | ||
006 - delete custom email provider action: | ||
command: ./test/integration/scripts/delete-custom-email-action.sh | ||
exit-code: 0 | ||
|
||
007 - create email provider: | ||
command: auth0 email provider create --provider=mandrill --enabled=false --default-from-address='[email protected]' --credentials='{"api_key":"some-api-key"}' --settings='{}' | ||
exit-code: 0 | ||
|
||
006 - it successfully shows the email provider: | ||
008 - it successfully shows the email provider: | ||
command: auth0 email provider show | ||
exit-code: 0 | ||
stdout: | ||
|
@@ -33,11 +41,11 @@ tests: | |
- DEFAULT FROM ADDRESS [email protected] | ||
- SETTINGS {} | ||
|
||
007 - update and enable email provider: | ||
009 - update and enable email provider: | ||
command: auth0 email provider update --enabled --default-from-address='[email protected]' | ||
exit-code: 0 | ||
|
||
008 - it successfully shows the email provider: | ||
010 - it successfully shows the email provider: | ||
command: auth0 email provider show | ||
exit-code: 0 | ||
stdout: | ||
|
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,12 @@ | ||
#! /bin/bash | ||
|
||
FILE=./test/integration/identifiers/custom-email-action-id | ||
|
||
# Create the action. | ||
action_id=$( auth0 actions create -n "integration-test-custom-email-action" -t "custom-email-provider" -c "exports.onExecuteCustomEmailProvider = async (event, api) => { return; };" --json | jq -r '.["id"]' ) | ||
|
||
# Deploy the action. | ||
auth0 actions deploy "$action_id" | ||
|
||
mkdir -p ./test/integration/identifiers | ||
echo "$action_id" > $FILE |
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 @@ | ||
#! /bin/bash | ||
|
||
FILE=./test/integration/identifiers/custom-email-action-id | ||
if [ -e "$FILE" ] | ||
then | ||
action_id=$(cat $FILE) | ||
|
||
# Delete the action. | ||
auth0 actions delete "$action_id" --force | ||
|
||
rm "$FILE" | ||
fi | ||
|