Skip to content

Commit

Permalink
Merge branch 'develop' into 2712-conditional-ceph-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
kenafoster authored Sep 26, 2024
2 parents 02464f5 + 1549693 commit c63d0c5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions tests/tests_deployment/test_dask_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import pytest

from tests.tests_deployment import constants
from tests.tests_deployment.utils import get_jupyterhub_token, monkeypatch_ssl_context

monkeypatch_ssl_context()
from tests.tests_deployment.utils import get_jupyterhub_token


@pytest.fixture
Expand All @@ -15,7 +13,17 @@ def dask_gateway_object():
os.environ["JUPYTERHUB_API_TOKEN"] = get_jupyterhub_token(
"dask-gateway-pytest-token"
)
return dask_gateway.Gateway(

# Create custom class from Gateway that disables the tls/ssl verification
# to do that we will override the self._request_kwargs dictionary within the
# __init__, targeting aiohttp.ClientSession.request method

class DaskGateway(dask_gateway.Gateway):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._request_kwargs.update({"ssl": False})

return DaskGateway(
address=f"https://{constants.NEBARI_HOSTNAME}/{constants.GATEWAY_ENDPOINT}",
auth="jupyterhub",
proxy_address=f"tcp://{constants.NEBARI_HOSTNAME}:8786",
Expand Down

0 comments on commit c63d0c5

Please sign in to comment.