diff --git a/tests/integration/test_forward_auth.py b/tests/integration/test_forward_auth.py index 839e85e7..04b6c93d 100644 --- a/tests/integration/test_forward_auth.py +++ b/tests/integration/test_forward_auth.py @@ -1,6 +1,5 @@ # Copyright 2023 Canonical Ltd. # See LICENSE file for licensing details. -import asyncio import json import logging from os.path import join @@ -81,15 +80,13 @@ async def test_deployment(ops_test: OpsTest, traefik_charm, forward_auth_tester_ stop=stop_after_attempt(20), reraise=True, ) -def test_allowed_forward_auth_url_redirect(ops_test: OpsTest) -> None: +async def test_allowed_forward_auth_url_redirect(ops_test: OpsTest) -> None: """Test that a request hitting an application protected by IAP is forwarded by traefik to oathkeeper. An allowed request should be performed without authentication. Retry the request to ensure the access rules were populated by oathkeeper. """ - requirer_url = asyncio.run( - get_reverse_proxy_app_url(ops_test, TRAEFIK_CHARM, IAP_REQUIRER_CHARM) - ) + requirer_url = await get_reverse_proxy_app_url(ops_test, TRAEFIK_CHARM, IAP_REQUIRER_CHARM) protected_url = join(requirer_url, "anything/allowed") diff --git a/tox.ini b/tox.ini index 895cba07..af9e5859 100644 --- a/tox.ini +++ b/tox.ini @@ -61,14 +61,12 @@ commands = [testenv:integration] description = Run integration tests deps = - # pinned for https://github.com/charmed-kubernetes/pytest-operator/issues/131 - pytest==8.1.1 - - # fix for https://github.com/pytest-dev/pytest-asyncio/releases/tag/v0.23.0 making pytest-operator b0rk - pytest-asyncio==0.21.0 + pytest==8.2.2 + pytest-asyncio==0.21.2 pytest-operator juju - tenacity + # fix for https://github.com/jd/tenacity/issues/471 + tenacity==8.3.0 sh -r{toxinidir}/requirements.txt commands =