From 53f1025256b9c9012e438bbcad7077bb95288637 Mon Sep 17 00:00:00 2001 From: yazansalti Date: Thu, 10 Oct 2024 14:42:13 +0400 Subject: [PATCH] Debug --- tests/integration/test_charm.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/integration/test_charm.py b/tests/integration/test_charm.py index 630115d..2068393 100644 --- a/tests/integration/test_charm.py +++ b/tests/integration/test_charm.py @@ -64,6 +64,12 @@ async def test_build_and_deploy(ops_test: OpsTest, request: pytest.FixtureReques await ops_test.model.deploy( "loki-k8s", application_name=LOKI_APPLICATION_NAME, trust=True, channel="stable" ) + await ops_test.model.deploy( + TRAEIK_K8S_APPLICATION_NAME, + application_name=TRAEIK_K8S_APPLICATION_NAME, + trust=True, + channel="stable", + ) await ops_test.model.wait_for_idle(apps=[APP_NAME], status="active", timeout=1000) @@ -192,12 +198,6 @@ async def test_given_loki_and_prometheus_related_to_notary_all_charm_statuses_ac async def test_given_application_deployed_when_related_to_traefik_k8s_then_all_statuses_active( ops_test: OpsTest, ): - await ops_test.model.deploy( - TRAEIK_K8S_APPLICATION_NAME, - application_name=TRAEIK_K8S_APPLICATION_NAME, - trust=True, - channel="stable", - ) # TODO (Tracked in TLSENG-475): This is a workaround so Traefik has the same CA as Notary # This should be removed and certificate transfer should be used instead # Notary k8s implements V1 of the certificate transfer interface, @@ -218,6 +218,9 @@ async def test_given_application_deployed_when_related_to_traefik_k8s_then_all_s raise_on_error=True, ) endpoint = await get_external_notary_endpoint(ops_test) + logger.info("===========") + logger.info(endpoint) + logger.info("===========") client = Notary(url=endpoint) assert client.is_api_available() @@ -232,6 +235,9 @@ async def get_notary_endpoint(ops_test: OpsTest) -> str: async def get_external_notary_endpoint(ops_test: OpsTest) -> str: assert ops_test.model traefik_proxied_endpoints = await run_show_traefik_proxied_endpoints_action(ops_test) + logger.info("===========") + logger.info(traefik_proxied_endpoints) + logger.info("===========") return json.loads(traefik_proxied_endpoints).get(APP_NAME, "").get("url", "") @@ -267,6 +273,9 @@ async def run_show_traefik_proxied_endpoints_action(ops_test: OpsTest) -> str: traefik_k8s_unit = ops_test.model.units[f"{TRAEIK_K8S_APPLICATION_NAME}/0"] action = await traefik_k8s_unit.run_action(action_name="show-proxied-endpoints") # type: ignore action_output = await ops_test.model.get_action_output(action_uuid=action.entity_id, wait=30) + logger.info("===========") + logger.info(action_output) + logger.info("===========") return action_output.get("proxied-endpoints", "")