forked from mozilla-services/screenshots
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add save to unavailable server test. (mozilla-services#4027)
- Loading branch information
Showing
3 changed files
with
69 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# This simple script creates an addon with an unavailable backend. At least one | ||
# of the Selenium tests rely on it. It also (re)creates the addon that might've | ||
# been replaced during the process. | ||
|
||
set -e | ||
|
||
SCRIPT_PATH=${0%/*} | ||
cd "$SCRIPT_PATH/../../" | ||
|
||
if [ -n "$SCREENSHOTS_BACKEND" ] | ||
then | ||
PREVIOUS_BACKEND=$SCREENSHOTS_BACKEND | ||
fi | ||
|
||
export SCREENSHOTS_BACKEND=${BAD_SCREENSHOTS_BACKEND:-'http://localhost:49152'} | ||
echo "Setting backend to ${SCREENSHOTS_BACKEND}" | ||
|
||
make bootstrap_zip >/dev/null | ||
mv build/screenshots-bootstrap.zip build/screenshots-bootstrap-server-down.zip | ||
echo "Created build/screenshots-bootstrap-server-down.zip" | ||
|
||
if [ -n "$PREVIOUS_BACKEND" ] | ||
then | ||
export SCREENSHOTS_BACKEND=$PREVIOUS_BACKEND | ||
else | ||
unset SCREENSHOTS_BACKEND | ||
fi | ||
|
||
make bootstrap_zip | ||
|
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