fix(ct): teardown litter users/calendars after API suites
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user