Skip to content

Commit

Permalink
Debug workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yhaliaw committed Aug 30, 2024
1 parent 7b430e5 commit 85f7079
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 8 additions & 0 deletions tests/integration/helpers/charm_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 85f7079

Please sign in to comment.