Testing
Cleaning up
Remove only your test run after producers and waits have finished.
For the Bash commands below, continue in the same terminal after the Bash / curl tab of the first-email quickstart. Its run ID, inbox and matched message variables are used below.
Clean up this test run
Optional, after inspection: this permanently deletes inboxes with this run’s tag prefix, their messages and stored content.
Keep the generated run ID; do not replace it with a shared prefix. Cleanup needs inbox write permission.
if [[ "$RUN_ID" =~ ^first-[a-f0-9]{24}$ ]]; then
curl --fail-with-body --silent --show-error "$INBOXSPEC_API_URL/v1/inboxes/cleanup" \
-H "Authorization: Bearer $INBOXSPEC_API_KEY" \
-H "content-type: application/json" \
-d "$(jq -n --arg tag_prefix "$RUN_ID" '{tag_prefix: $tag_prefix}')"
else
printf '%s\n' 'Use the complete run ID created in step 1; cleanup was not sent.' >&2
false
fiClean up CI fixtures
For a fixture manifest, use the exact run ID passed to fixture setup. The example below matches the run in the OTP test recipe; replace it with your own run ID.
inboxspec fixtures cleanup --run ci.4182.a1.w1 --jsonRun cleanup after producers and waits finish, in a finally block or an always-run CI step. Check for complete cleanup and resume an incomplete cleanup with the same run ID. Cleanup does not reset usage or remove accounting history.