mirror of
https://github.com/OpenKMIP/PyKMIP.git
synced 2025-07-21 13:04:22 +02:00
Merge pull request #363 from OpenKMIP/feat/update-test-infra
Update the Travis CI infrastructure to run integration tests
This commit is contained in:
commit
553ee285ac
64
.travis.yml
64
.travis.yml
@ -1,67 +1,101 @@
|
|||||||
|
sudo: true
|
||||||
language: python
|
language: python
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
os: linux
|
os: linux
|
||||||
dist: precise
|
dist: precise
|
||||||
env: TOXENV=py27
|
env: TOXENV=py27 RUN_INTEGRATION_TESTS=0
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: TOXENV=py27
|
env: TOXENV=py27 RUN_INTEGRATION_TESTS=0
|
||||||
|
- python: 2.7
|
||||||
|
os: linux
|
||||||
|
dist: precise
|
||||||
|
env: TOXENV=py27 RUN_INTEGRATION_TESTS=1
|
||||||
|
- python: 2.7
|
||||||
|
os: linux
|
||||||
|
dist: trusty
|
||||||
|
env: TOXENV=py27 RUN_INTEGRATION_TESTS=1
|
||||||
- python: 3.4
|
- python: 3.4
|
||||||
os: linux
|
os: linux
|
||||||
dist: precise
|
dist: precise
|
||||||
env: TOXENV=py34
|
env: TOXENV=py34 RUN_INTEGRATION_TESTS=0
|
||||||
- python: 3.4
|
- python: 3.4
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: TOXENV=py34
|
env: TOXENV=py34 RUN_INTEGRATION_TESTS=0
|
||||||
|
- python: 3.4
|
||||||
|
os: linux
|
||||||
|
dist: precise
|
||||||
|
env: TOXENV=py34 RUN_INTEGRATION_TESTS=1
|
||||||
|
- python: 3.4
|
||||||
|
os: linux
|
||||||
|
dist: trusty
|
||||||
|
env: TOXENV=py34 RUN_INTEGRATION_TESTS=1
|
||||||
- python: 3.5
|
- python: 3.5
|
||||||
os: linux
|
os: linux
|
||||||
dist: precise
|
dist: precise
|
||||||
env: TOXENV=py35
|
env: TOXENV=py35 RUN_INTEGRATION_TESTS=0
|
||||||
- python: 3.5
|
- python: 3.5
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: TOXENV=py35
|
env: TOXENV=py35 RUN_INTEGRATION_TESTS=0
|
||||||
|
- python: 3.5
|
||||||
|
os: linux
|
||||||
|
dist: precise
|
||||||
|
env: TOXENV=py35 RUN_INTEGRATION_TESTS=1
|
||||||
|
- python: 3.5
|
||||||
|
os: linux
|
||||||
|
dist: trusty
|
||||||
|
env: TOXENV=py35 RUN_INTEGRATION_TESTS=1
|
||||||
- python: 3.6
|
- python: 3.6
|
||||||
os: linux
|
os: linux
|
||||||
dist: precise
|
dist: precise
|
||||||
env: TOXENV=py36
|
env: TOXENV=py36 RUN_INTEGRATION_TESTS=0
|
||||||
- python: 3.6
|
- python: 3.6
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: TOXENV=py36
|
env: TOXENV=py36 RUN_INTEGRATION_TESTS=0
|
||||||
|
- python: 3.6
|
||||||
|
os: linux
|
||||||
|
dist: precise
|
||||||
|
env: TOXENV=py36 RUN_INTEGRATION_TESTS=1
|
||||||
|
- python: 3.6
|
||||||
|
os: linux
|
||||||
|
dist: trusty
|
||||||
|
env: TOXENV=py36 RUN_INTEGRATION_TESTS=1
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
os: linux
|
os: linux
|
||||||
dist: precise
|
dist: precise
|
||||||
env: TOXENV=pep8
|
env: TOXENV=pep8 RUN_INTEGRATION_TESTS=0
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: TOXENV=pep8
|
env: TOXENV=pep8 RUN_INTEGRATION_TESTS=0
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
os: linux
|
os: linux
|
||||||
dist: precise
|
dist: precise
|
||||||
env: TOXENV=bandit
|
env: TOXENV=bandit RUN_INTEGRATION_TESTS=0
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: TOXENV=bandit
|
env: TOXENV=bandit RUN_INTEGRATION_TESTS=0
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
os: linux
|
os: linux
|
||||||
dist: precise
|
dist: precise
|
||||||
env: TOXENV=docs
|
env: TOXENV=docs RUN_INTEGRATION_TESTS=0
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: TOXENV=docs
|
env: TOXENV=docs RUN_INTEGRATION_TESTS=0
|
||||||
install:
|
install:
|
||||||
- pip install tox
|
- pip install tox
|
||||||
- pip install bandit
|
- pip install bandit
|
||||||
- pip install codecov
|
- pip install codecov
|
||||||
|
- python setup.py install
|
||||||
script:
|
script:
|
||||||
- tox
|
- ./.travis/run.sh
|
||||||
after_success:
|
after_success:
|
||||||
- codecov
|
- codecov
|
||||||
|
12
.travis/pykmip.conf
Normal file
12
.travis/pykmip.conf
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[client]
|
||||||
|
host=127.0.0.1
|
||||||
|
port=5696
|
||||||
|
keyfile=/etc/pykmip/certs/key.pem
|
||||||
|
certfile=/etc/pykmip/certs/cert.pem
|
||||||
|
cert_reqs=CERT_REQUIRED
|
||||||
|
ssl_version=PROTOCOL_SSLv23
|
||||||
|
ca_certs=/etc/pykmip/certs/cert.pem
|
||||||
|
do_handshake_on_connect=True
|
||||||
|
suppress_ragged_eofs=True
|
||||||
|
username=
|
||||||
|
password=
|
20
.travis/run.sh
Executable file
20
.travis/run.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [[ "${RUN_INTEGRATION_TESTS}" == "1" ]]; then
|
||||||
|
sudo mkdir -p /etc/pykmip/certs
|
||||||
|
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
|
||||||
|
sudo mkdir /var/log/pykmip
|
||||||
|
sudo chmod 777 /var/log/pykmip
|
||||||
|
python ./bin/run_server.py &
|
||||||
|
tox -e integration -- --config client
|
||||||
|
else
|
||||||
|
tox
|
||||||
|
fi
|
||||||
|
|
8
.travis/server.conf
Normal file
8
.travis/server.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[server]
|
||||||
|
hostname=127.0.0.1
|
||||||
|
port=5696
|
||||||
|
certificate_path=/etc/pykmip/certs/cert.pem
|
||||||
|
key_path=/etc/pykmip/certs/key.pem
|
||||||
|
ca_path=/etc/pykmip/certs/cert.pem
|
||||||
|
auth_suite=Basic
|
||||||
|
enable_tls_client_auth=False
|
Loading…
x
Reference in New Issue
Block a user