diff --git a/tests/integration/test_charm.py b/tests/integration/test_charm.py index 9f632f8..127c02a 100644 --- a/tests/integration/test_charm.py +++ b/tests/integration/test_charm.py @@ -207,6 +207,10 @@ async def test_given_application_deployed_when_related_to_traefik_k8s_then_all_s relation1=f"{TLS_PROVIDER_APPLICATION_NAME}:certificates", relation2=f"{TRAEIK_K8S_APPLICATION_NAME}", ) + await ops_test.model.integrate( + relation1=f"{TLS_PROVIDER_APPLICATION_NAME}:certificates", + relation2=f"{APP_NAME}:access-certificates", + ) await ops_test.model.integrate( relation1=f"{APP_NAME}:ingress", relation2=f"{TRAEIK_K8S_APPLICATION_NAME}:ingress", @@ -217,13 +221,10 @@ async def test_given_application_deployed_when_related_to_traefik_k8s_then_all_s timeout=1000, raise_on_error=True, ) - endpoint = await get_external_notary_endpoint(ops_test) assert ops_test.model - admin_credentials = await get_notary_credentials(ops_test) - token = admin_credentials.get("token") - assert token + endpoint = await get_external_notary_endpoint(ops_test) client = Notary(url=endpoint) - assert client.token_is_valid(token) + assert client.is_api_available() async def get_notary_endpoint(ops_test: OpsTest) -> str: