diff --git a/jupyterhub/tests/test_proxy.py b/jupyterhub/tests/test_proxy.py index e912bc62..60f2d0e0 100644 --- a/jupyterhub/tests/test_proxy.py +++ b/jupyterhub/tests/test_proxy.py @@ -9,12 +9,12 @@ from urllib.parse import urlparse import pytest from traitlets.config import Config -from .. import orm from ..utils import url_path_join as ujoin from ..utils import wait_for_http_server from .mocking import MockHub from .test_api import add_user from .test_api import api_request +from .utils import skip_if_ssl @pytest.fixture @@ -27,6 +27,7 @@ def disable_check_routes(app): app.last_activity_callback.start() +@skip_if_ssl async def test_external_proxy(request): auth_token = 'secret!' proxy_ip = '127.0.0.1' diff --git a/jupyterhub/tests/test_services.py b/jupyterhub/tests/test_services.py index 127a9f45..22ee175b 100644 --- a/jupyterhub/tests/test_services.py +++ b/jupyterhub/tests/test_services.py @@ -17,6 +17,7 @@ from ..utils import url_path_join from ..utils import wait_for_http_server from .mocking import public_url from .utils import async_requests +from .utils import skip_if_ssl mockservice_path = os.path.dirname(os.path.abspath(__file__)) mockservice_py = os.path.join(mockservice_path, 'mockservice.py') @@ -63,6 +64,7 @@ async def test_managed_service(mockservice): assert service.proc.poll() is None +@skip_if_ssl async def test_proxy_service(app, mockservice_url): service = mockservice_url name = service.name @@ -76,6 +78,7 @@ async def test_proxy_service(app, mockservice_url): assert r.text.endswith(path) +@skip_if_ssl async def test_external_service(app): name = 'external' async with external_service(app, name=name) as env: diff --git a/jupyterhub/tests/utils.py b/jupyterhub/tests/utils.py index 09aeb196..2c8210b2 100644 --- a/jupyterhub/tests/utils.py +++ b/jupyterhub/tests/utils.py @@ -1,6 +1,8 @@ import asyncio +import os from concurrent.futures import ThreadPoolExecutor +import pytest import requests from certipy import Certipy @@ -52,6 +54,9 @@ def ssl_setup(cert_dir, authority_name): return external_certs +skip_if_ssl = pytest.mark.skipif(os.environ.get('SSL_ENABLED', False)) + + def check_db_locks(func): """Decorator that verifies no locks are held on database upon exit.