2017-11-08 21:22:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
if [[ "${RUN_INTEGRATION_TESTS}" == "1" ]]; then
|
|
|
|
sudo mkdir -p /etc/pykmip/certs
|
2018-02-20 19:03:55 +01:00
|
|
|
sudo mkdir -p /etc/pykmip/policies
|
2017-11-08 21:22:55 +01:00
|
|
|
cd /etc/pykmip/certs
|
|
|
|
sudo openssl req -x509 -subj "/CN=test" -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
|
|
|
|
cd -
|
|
|
|
sudo cp ./.travis/pykmip.conf /etc/pykmip/pykmip.conf
|
|
|
|
sudo cp ./.travis/server.conf /etc/pykmip/server.conf
|
2018-02-20 19:03:55 +01:00
|
|
|
sudo cp ./.travis/policy.json /etc/pykmip/policies/policy.json
|
2017-11-08 21:22:55 +01:00
|
|
|
sudo mkdir /var/log/pykmip
|
|
|
|
sudo chmod 777 /var/log/pykmip
|
|
|
|
python ./bin/run_server.py &
|
|
|
|
tox -e integration -- --config client
|
|
|
|
else
|
|
|
|
tox
|
|
|
|
fi
|