mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
run integration tests with pytest
adds integration-tests directory
This commit is contained in:
@@ -72,9 +72,14 @@ jobs:
|
|||||||
python3 .circleci/integration-test.py run 'systemctl --no-pager status jupyterhub configurable-http-proxy'
|
python3 .circleci/integration-test.py run 'systemctl --no-pager status jupyterhub configurable-http-proxy'
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: check jupyterhub is up
|
name: install integration test requirements
|
||||||
command: |
|
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:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
|
|||||||
2
integration-tests/requirements.txt
Normal file
2
integration-tests/requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
pytest
|
||||||
|
requests
|
||||||
5
integration-tests/test_hub.py
Normal file
5
integration-tests/test_hub.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import requests
|
||||||
|
|
||||||
|
def test_hub_up():
|
||||||
|
r = requests.get('http://127.0.0.1')
|
||||||
|
r.raise_for_status()
|
||||||
Reference in New Issue
Block a user