fix(ct): teardown litter users/calendars after API suites
CI / test (push) Successful in 7m3s
CI / deploy-ift (push) Successful in 3m53s
CI / e2e-ift (push) Successful in 3m34s
CI / deploy-stage (push) Successful in 2m19s
CI / e2e-stage (push) Successful in 1m19s

Track users/calendars created via register_and_login and create_calendar;
soft-delete via admin API in end_per_suite. Skip with CT_KEEP_DATA=1.
Safety-net soft-deletes remaining @test.local users.

Fixes EventHub/EventHubBack#65
This commit is contained in:
2026-07-31 12:21:15 +03:00
parent 7d39c004a1
commit ba1649f344
4 changed files with 151 additions and 2 deletions
+6
View File
@@ -2,6 +2,11 @@
# Full API CT suite against live stand (remote) + smoke-core on stand host.
# Usage: run-stand-api-tests.sh <ift|stage>
# Requires: ADMIN_* from load-stand-api-env.sh; SSH_* for smoke-core on stand.
#
# Litter cleanup: after each CT suite, api_test_runner:cleanup_tracked/0
# soft-deletes tracked calendars/users via admin API (and @test.local safety-net).
# Skip teardown: CT_KEEP_DATA=1 (data remains on the stand).
# Soft-delete ≠ hard wipe; full clean slate = ops Mnesia volume wipe.
set -euo pipefail
STAND="${1:?stand: ift|stage}"
@@ -134,6 +139,7 @@ docker run --rm --network=host \
-e "ADMIN_MODER_PASSWORD=${ADMIN_MODER_PASSWORD:-}" \
-e "ADMIN_SUPPORT_EMAIL=${ADMIN_SUPPORT_EMAIL:-}" \
-e "ADMIN_SUPPORT_PASSWORD=${ADMIN_SUPPORT_PASSWORD:-}" \
-e "CT_KEEP_DATA=${CT_KEEP_DATA:-}" \
"${IMAGE}"
CT_RC=$?
set -e