From 150d1b23ff02ac707c67bfcee1de91eec587739a Mon Sep 17 00:00:00 2001 From: Ali Ugur Date: Thu, 6 Feb 2025 07:25:02 +0300 Subject: [PATCH] Chore(): Fix test --- tests/integration/conftest.py | 6 +++--- tests/integration/integrations/conftest.py | 3 ++- tests/integration/integrations/test_tracing.py | 7 +++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 1fd79aa..2230b2f 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -123,7 +123,7 @@ async def django_app_fixture( ) await model.integrate(app_name, postgresql_k8s.name) await model.wait_for_idle( - apps=[app_name, postgresql_k8s.name], status="active", timeout=300, raise_on_blocked=True + apps=[app_name, postgresql_k8s.name], status="active", timeout=300 ) return app @@ -147,7 +147,7 @@ async def fastapi_app_fixture( app = await model.deploy(charm_file, resources=resources, application_name=app_name) await model.integrate(app_name, postgresql_k8s.name) await model.wait_for_idle( - apps=[app_name, postgresql_k8s.name], status="active", timeout=300, raise_on_blocked=True + apps=[app_name, postgresql_k8s.name], status="active", timeout=300 ) return app @@ -171,7 +171,7 @@ async def go_app_fixture( app = await model.deploy(charm_file, resources=resources, application_name=app_name) await model.integrate(app_name, postgresql_k8s.name) await model.wait_for_idle( - apps=[app_name, postgresql_k8s.name], status="active", timeout=300, raise_on_blocked=True + apps=[app_name, postgresql_k8s.name], status="active", timeout=300 ) return app diff --git a/tests/integration/integrations/conftest.py b/tests/integration/integrations/conftest.py index 8e4989b..4d65df9 100644 --- a/tests/integration/integrations/conftest.py +++ b/tests/integration/integrations/conftest.py @@ -93,13 +93,14 @@ async def deploy_tempo_cluster(ops_test: OpsTest, get_unit_ips): tempo_worker_charm_url, worker_channel = "tempo-worker-k8s", "edge" tempo_coordinator_charm_url, coordinator_channel = "tempo-coordinator-k8s", "edge" await ops_test.model.deploy( - tempo_worker_charm_url, application_name=worker_app, channel=worker_channel, trust=True + tempo_worker_charm_url, application_name=worker_app, channel=worker_channel, trust=True, revision=43, ) app = await ops_test.model.deploy( tempo_coordinator_charm_url, application_name=tempo_app, channel=coordinator_channel, trust=True, + revision=53 ) await ops_test.model.deploy("s3-integrator", channel="edge") await ops_test.model.integrate(tempo_app + ":s3", "s3-integrator" + ":s3-credentials") diff --git a/tests/integration/integrations/test_tracing.py b/tests/integration/integrations/test_tracing.py index 75fdbbf..d42a70a 100644 --- a/tests/integration/integrations/test_tracing.py +++ b/tests/integration/integrations/test_tracing.py @@ -43,11 +43,10 @@ async def test_workload_tracing( assert: Tempo should have tracing info about the app. """ try: - tempo_app = await request.getfixturevalue("tempo_app") + tempo_app = request.getfixturevalue("tempo_app") except Exception as e: - if "object Application can't be used in 'await' expression" not in e: - logger.info(f"Tempo is already deployed {e}") - tempo_app = model.applications["tempo"] + logger.info(f"Tempo is already deployed {e}") + tempo_app = model.applications["tempo"] tracing_app = request.getfixturevalue(tracing_app_fixture)