Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Commit 0246dbd

Browse files
jrgmvladikoff
authored andcommitted
fix(tests): add a script to be run to check resource deployment (#5147) r=vladikoff
1 parent 01a2aeb commit 0246dbd

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/usr/bin/env bash
2+
3+
# This Source Code Form is subject to the terms of the Mozilla Public
4+
# License, v. 2.0. If a copy of the MPL was not distributed with this
5+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
7+
set -o errexit # exit on first command with non-zero status
8+
9+
# Dump out the `/__version__` data, and if not valid JSON, then
10+
# exit and abort this test run, to make it clear early on that
11+
# one or more test servers are not in a testable state.
12+
function check_version {
13+
echo "Checking server $1"
14+
local version_info=$(curl -s $1)
15+
if ! echo $version_info | python -mjson.tool; then
16+
echo "Invalid Server Response. Exiting: ${version_info}"
17+
exit 1
18+
fi
19+
}
20+
21+
BASENAME=$(basename $0)
22+
DIRNAME=$(dirname $0)
23+
24+
if [ "x$1" = "x" ]; then
25+
echo "Usage: $0 test-name"
26+
exit
27+
fi
28+
FXA_TEST_NAME=$1
29+
30+
source $DIRNAME/defaults.sh
31+
source $DIRNAME/$FXA_TEST_NAME
32+
33+
echo "FXA_TEST_NAME $FXA_TEST_NAME"
34+
echo "FXA_CONTENT_ROOT $FXA_CONTENT_ROOT"
35+
echo "FXA_AUTH_ROOT $FXA_AUTH_ROOT"
36+
echo "FXA_OAUTH_APP_ROOT $FXA_OAUTH_APP_ROOT"
37+
echo "FXA_DEV_BOX $FXA_DEV_BOX"
38+
echo "FXA_FIREFOX_BINARY $FXA_FIREFOX_BINARY"
39+
40+
echo "FXA_CONTENT_VERSION $FXA_CONTENT_VERSION"
41+
echo "FXA_OAUTH_VERSION $FXA_OAUTH_VERSION"
42+
echo "FXA_PROFILE_VERSION $FXA_PROFILE_VERSION"
43+
echo "FXA_AUTH_VERSION $FXA_AUTH_VERSION"
44+
45+
echo ""
46+
echo "Server versions:"
47+
check_version $FXA_CONTENT_VERSION
48+
echo ""
49+
50+
set -o xtrace # echo the following commands
51+
52+
./tests/teamcity/install-npm-deps.sh
53+
54+
./node_modules/.bin/intern-client \
55+
config=tests/intern_server_resources \
56+
fxaAuthRoot="$FXA_AUTH_ROOT" \
57+
fxaContentRoot="$FXA_CONTENT_ROOT" \
58+
fxaOAuthRoot="$FXA_OAUTH_ROOT" \
59+
fxaProfileRoot="$FXA_PROFILE_ROOT" \
60+
fxaTokenRoot="$FXA_TOKEN_ROOT" \
61+
fxaProduction="true" \
62+
fxaDevBox="$FXA_DEV_BOX" \
63+
asyncTimeout=10000

0 commit comments

Comments
 (0)