From 5ad61405aeb47a1b2f2c96fcfb396bb1bca9709a Mon Sep 17 00:00:00 2001 From: jneo8 Date: Fri, 20 Oct 2023 16:52:45 +0800 Subject: [PATCH] ci: Try to debug CI error --- tests/functional/test_charm.py | 64 ++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/tests/functional/test_charm.py b/tests/functional/test_charm.py index a2fcf3da..e1f0d764 100644 --- a/tests/functional/test_charm.py +++ b/tests/functional/test_charm.py @@ -43,40 +43,44 @@ async def test_build_and_deploy(ops_test: OpsTest, series, sync_helper): charm = await ops_test.build_charm(".") assert charm, "Charm was not built successfully." - await asyncio.gather( - ops_test.model.deploy( - ops_test.render_bundle( - "tests/functional/bundle.yaml.j2", - charm=charm, - series=series, - resources={ - "storcli-deb": "empty-resource", - "perccli-deb": "empty-resource", - "sas2ircu-bin": "empty-resource", - "sas3ircu-bin": "empty-resource", - }, - ) - ), - ops_test.model.wait_for_idle( - apps=[APP_NAME], - status="blocked", - timeout=TIMEOUT, - ), - ops_test.model.wait_for_idle( - apps=[GRAFANA_AGENT_APP_NAME], - status="blocked", - timeout=TIMEOUT, - ), - ops_test.model.wait_for_idle( - apps=[PRINCIPAL_APP_NAME], - status="active", - raise_on_blocked=True, - timeout=TIMEOUT, - ), + bundle = ops_test.render_bundle( + "tests/functional/bundle.yaml.j2", + charm=charm, + series=series, + resources={ + "storcli-deb": "empty-resource", + "perccli-deb": "empty-resource", + "sas2ircu-bin": "empty-resource", + "sas3ircu-bin": "empty-resource", + }, + ) + + ops_test.model.deploy(bundle), + ops_test.model.wait_for_idle( + apps=[PRINCIPAL_APP_NAME], + status="active", + raise_on_blocked=True, + timeout=TIMEOUT, + ) + ops_test.model.wait_for_idle( + apps=[GRAFANA_AGENT_APP_NAME], + status="blocked", + timeout=TIMEOUT, + ) + ops_test.model.wait_for_idle( + apps=[APP_NAME], + status="blocked", + timeout=TIMEOUT, ) + for unit in ops_test.model.applications[GRAFANA_AGENT_APP_NAME].units: + print(unit.workload_status_message) + print(unit.workload_status) + # Test initial workload status for unit in ops_test.model.applications[APP_NAME].units: + print(unit.workload_status_message) + print(unit.workload_status) assert AppStatus.MISSING_RESOURCES not in unit.workload_status_message assert unit.workload_status_message == AppStatus.MISSING_RELATION