ci(nightly): post-deploy smoke test for /api/admin/import-status #531
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: CI / smoke test
Priority: P2-medium — production correctness of an admin-only endpoint that no current smoke step exercises
Source: review of #526 by Sara Holt (QA) — comment #8649, finding 2
Parent PR: #526 (mass-import bind mount)
Summary
Add a post-deploy smoke step to
nightly.yml(andrelease.yml) that authenticates as the staging admin, hitsGET /api/admin/import-status, asserts HTTP 200, and assertsstateis one of{IDLE, RUNNING, DONE, FAILED}.Context
#526 added structural regression guards (compose-config grep) for the
/importbind mount, but didn't add a behavioural smoke check that the mass-import endpoint actually responds correctly after a fresh deploy. The currentnightly.ymlsmoke step only verifies HSTS, Permissions-Policy, and/actuatorblocking — nothing exercises an admin-authenticated endpoint.A future regression that breaks admin auth, or somehow corrupts the
MassImportServicebean wiring, would not be caught until an operator manually clicks the import card.Required
.gitea/workflows/nightly.ymlwith a check against/api/admin/import-status.STAGING_APP_ADMIN_USERNAME/STAGING_APP_ADMIN_PASSWORDalready available as secrets)GET /api/admin/import-statusstatein{IDLE, RUNNING, DONE, FAILED}(parsed viajq)::error::annotation.Notes
/api/admin/*should return 401/403, not 200 — so the smoke test must include auth. Easiest: Basic Auth header (the SecurityConfig already supports it from #520).up -d --wait, which already guarantees backend health, so the auth + endpoint test is meaningful additional coverage rather than redundant.Acceptance criteria
nightly.ymlrelease.ymlfor production (or a follow-up issue tracks that)::error::annotation in the workflow logLinked NFRs
Definition of Ready
🤖 Generated with Claude Code during /implement on #526