-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtest-integration.sh
More file actions
executable file
·42 lines (35 loc) · 1.02 KB
/
test-integration.sh
File metadata and controls
executable file
·42 lines (35 loc) · 1.02 KB
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
#
# Preps a test environment and runs `make test-integration` with single-node vagrant.
echo Testing ${DEIS_TEST_APP?}...
THIS_DIR=$(cd $(dirname $0); pwd) # absolute path
# Environment reset and configuration
rm -rf ~/.deis ~/.fleetctl ~/.ssh/known_hosts
ssh-add -D || eval $(ssh-agent) && ssh-add -D
ssh-add ~/.vagrant.d/insecure_private_key
ssh-add ~/.ssh/deis
cd ${GOPATH?}/src/github.com/deis/deis
rm -rf tests/example-*
# Vagrant provisioning
$THIS_DIR/halt-all-vagrants.sh
vagrant destroy --force
vagrant up --provider virtualbox --provision
# Trap exit signal to halt vagrant
function cleanup {
set +e
make stop
vagrant halt
}
trap cleanup EXIT
set -e
# Build updated Deis CLI and use it for testing
virtualenv --system-site-packages venv
. venv/bin/activate
pip install docopt==0.6.2 python-dateutil==2.2 PyYAML==3.11 requests==2.3.0 pyinstaller==2.1
make -C client/ client
chmod +x client/dist/deis
export PATH=`pwd`/client/dist:$PATH
# Install Deis and run tests
make build
make run
make test-integration