From 85f7079e916fc9e4f44a686d48440c9b5409b114 Mon Sep 17 00:00:00 2001 From: yhaliaw <43424755+yhaliaw@users.noreply.github.com> Date: Fri, 30 Aug 2024 13:05:03 +0800 Subject: [PATCH] Debug workflow --- .github/workflows/integration_test.yaml | 2 +- tests/integration/helpers/charm_metrics.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 7d371d046..91137ea43 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -3,7 +3,7 @@ name: integration-tests on: # TODO: debug workflow_dispatch: - pull_request: + # pull_request: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/tests/integration/helpers/charm_metrics.py b/tests/integration/helpers/charm_metrics.py index b6c2f05bc..d42761c50 100644 --- a/tests/integration/helpers/charm_metrics.py +++ b/tests/integration/helpers/charm_metrics.py @@ -182,6 +182,10 @@ async def assert_events_after_reconciliation( metrics_log = await get_metrics_log(unit=unit) log_lines = list(map(lambda line: json.loads(line), metrics_log.splitlines())) events = set(map(lambda line: line.get("event"), log_lines)) + # TODO: debug + import pytest + pytest.set_trace() + assert { "runner_start", "runner_stop", @@ -209,6 +213,10 @@ async def assert_events_after_reconciliation( JobConclusion.CANCELLED, ] elif post_job_status == PostJobStatus.REPO_POLICY_CHECK_FAILURE: + # TODO: debug + import pytest + pytest.set_trace() + assert metric_log.get("status_info", {}).get("code", 0) == 403 assert metric_log.get("job_conclusion") == JobConclusion.FAILURE else: