-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for a PR number in the email notification.
- Loading branch information
1 parent
6015d4c
commit fdf6e3d
Showing
3 changed files
with
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ load _helper.bash | |
popd >/dev/null || exit 1 | ||
} | ||
|
||
@test "Notify: email" { | ||
@test "Notify: email, branch" { | ||
pushd "${LOCAL_REPO_DIR}" >/dev/null || exit 1 | ||
|
||
export VORTEX_NOTIFY_CHANNELS="email" | ||
|
@@ -65,6 +65,38 @@ load _helper.bash | |
assert_output_contains "Notification email(s) sent to: [email protected], [email protected], [email protected]" | ||
assert_output_contains "Finished email notification." | ||
|
||
assert_output_contains "Site testproject \"develop\" branch has been deployed" | ||
assert_output_contains "and is available at https://develop.testproject.com." | ||
echo "${output}" >&3 | ||
|
||
assert_output_contains "Finished dispatching notifications." | ||
|
||
popd >/dev/null || exit 1 | ||
} | ||
|
||
@test "Notify: email, PR" { | ||
pushd "${LOCAL_REPO_DIR}" >/dev/null || exit 1 | ||
|
||
export VORTEX_NOTIFY_CHANNELS="email" | ||
export VORTEX_NOTIFY_PROJECT="testproject" | ||
export DRUPAL_SITE_EMAIL="[email protected]" | ||
export VORTEX_NOTIFY_EMAIL_RECIPIENTS="[email protected]|John Doe, [email protected]|Jane Doe" | ||
export VORTEX_NOTIFY_REF="develop" | ||
export VORTEX_NOTIFY_PR_NUMBER="123" | ||
export VORTEX_NOTIFY_ENVIRONMENT_URL="https://develop.testproject.com" | ||
run ./scripts/vortex/notify.sh | ||
assert_success | ||
|
||
assert_output_contains "Started dispatching notifications." | ||
|
||
assert_output_contains "Started email notification." | ||
assert_output_contains "Notification email(s) sent to: [email protected], [email protected]" | ||
assert_output_contains "Finished email notification." | ||
|
||
assert_output_contains "Site testproject \"PR-123\" has been deployed" | ||
assert_output_contains "and is available at https://develop.testproject.com." | ||
echo "${output}" >&3 | ||
|
||
assert_output_contains "Finished dispatching notifications." | ||
|
||
popd >/dev/null || exit 1 | ||
|
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
fdf6e3d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://vortex-docs.netlify.app as production
🚀 Deployed on https://679c9ec473b13743bab604b5--vortex-docs.netlify.app