Parent issue: #52
Summary
Add an integration test suite that boots the real promgithub HTTP server in-process and validates behavior through real HTTP requests and /metrics scrapes.
Scope
- Start the real router/server with an isolated Prometheus registry.
- Send signed webhook requests to
/webhook.
- Scrape
/metrics and assert exported samples.
- Cover
/health and invalid-signature behavior.
Scenarios
workflow_run webhook updates metrics correctly.
workflow_job webhook updates metrics correctly.
push webhook updates metrics correctly.
pull_request webhook updates metrics correctly.
- Invalid signature returns
401 and does not mutate metrics.
- Unsupported event type does not crash and does not emit incorrect metrics.
Design notes
- Prefer scrape-level assertions over direct internal counter inspection.
- Reuse stable JSON fixtures under
test_data/ where possible.
- Keep the suite self-contained and fast enough for normal PR execution.
Acceptance criteria
- Tests exercise HTTP request -> handler -> metric scrape end to end.
- Assertions validate real exported metrics, not just internal state.
- The suite runs reliably in CI without external dependencies.
Parent issue: #52
Summary
Add an integration test suite that boots the real promgithub HTTP server in-process and validates behavior through real HTTP requests and
/metricsscrapes.Scope
/webhook./metricsand assert exported samples./healthand invalid-signature behavior.Scenarios
workflow_runwebhook updates metrics correctly.workflow_jobwebhook updates metrics correctly.pushwebhook updates metrics correctly.pull_requestwebhook updates metrics correctly.401and does not mutate metrics.Design notes
test_data/where possible.Acceptance criteria