Merge pull request #43 from minrk/integration-tests-pytest

run integration tests with pytest
This commit is contained in:
Yuvi Panda
2018-07-16 18:31:52 -07:00
committed by GitHub
5 changed files with 17 additions and 4 deletions

View File

@@ -72,9 +72,14 @@ jobs:
python3 .circleci/integration-test.py run 'systemctl --no-pager status jupyterhub configurable-http-proxy'
- run:
name: check jupyterhub is up
name: install integration test requirements
command: |
python3 .circleci/integration-test.py run 'curl -L --fail http://127.0.0.1'
python3 .circleci/integration-test.py run 'python3 -m pip install -r /srv/src/integration-tests/requirements.txt'
- run:
name: run integration tests
command: |
python3 .circleci/integration-test.py run 'python3 -m pytest -v /srv/src/integration-tests'
workflows:
version: 2

View File

@@ -87,8 +87,9 @@ def main():
image_name = 'tljh-systemd'
container_name = 'tljh-ci-run'
source_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
source_path = os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir, 'integration-tests')
)
if args.action == 'build-image':
build_systemd_image(image_name, source_path)

View File

@@ -0,0 +1,2 @@
pytest
requests

View File

@@ -0,0 +1,5 @@
import requests
def test_hub_up():
r = requests.get('http://127.0.0.1')
r.raise_for_status()