mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-12 12:33:02 +00:00
Skip SSL-free tests if not on SSL matrix
This commit is contained in:
@@ -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'
|
||||
|
@@ -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:
|
||||
|
@@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user