forked from control-center/serviced
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacceptance.sh
executable file
·42 lines (34 loc) · 1.28 KB
/
acceptance.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
#######################################################
#
# Control Center Acceptance Test
#
# You must define the serviced login credentials by setting
# the environment variables APPLICATION_USERID
# and APPLICATION_PASSWORD before running this script.
#
# Any command line arguments passed to the this script will be
# passed through to acceptance/runUIAcceptance.sh
#
#######################################################
# Use a directory unique to this test to avoid collisions with other kinds of tests
TEST_BASE_PATH=/tmp/serviced-acceptance/
. test_lib.sh
trap cleanup EXIT
print_env_info
# Force a clean environment
echo "Starting Pre-test cleanup ..."
cleanup --ignore-errors
echo "Pre-test cleanup complete"
# Setup
install_prereqs
add_to_etc_hosts
start_serviced && succeed "Serviced started within timeout" || fail "serviced failed to start within $START_TIMEOUT seconds."
# build/start mock agents
cd ${DIR}
make mockAgent
cd ${DIR}/acceptance
sudo GOPATH=${GOPATH} PATH=${PATH} ./startMockAgents.sh --no-wait
# launch cucumber/capybara with colorized output disabled for better readability in Jenkins
SERVICED_BINARY=${SERVICED_BINARY} CUCUMBER_OPTS=--no-color ./runUIAcceptance.sh -a https://${HOSTNAME} $*
# "trap cleanup EXIT", above, will handle cleanup