feat: a launch cleanup that clears the test orders, run once by hand

ops.launch_reset counts the orders, quotes, payment attempts and
notifications, and with --confirmar APAGAR removes them, with their moves,
files and notices. The artwork files are marked expired so the worker
deletes them from storage. Operators, the Tiny connection and the backups
stay; --contas also removes customer accounts. It refuses if any payment
was made with real money. Order numbers restart at #1 with the database
administrator's rights, so the script prints the psql line for the db
container when the worker's role cannot do it.

The test runs last in CI, since it empties the order tables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-05 12:07:24 -03:00
parent 1b445f0459
commit b1fbaad2bd
4 changed files with 152 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ jobs:
# one a developer exercises on localhost.
- name: API and workflow regressions
run: |
for suite in smoke_test workflow_test security_test scanning_test payment_test quote_pagination_test kanban_test reconcile_test order_actions_test print_file_test; do
for suite in smoke_test workflow_test security_test scanning_test payment_test quote_pagination_test kanban_test reconcile_test order_actions_test print_file_test launch_reset_test; do
echo "--- $suite"
$COMPOSE exec -T \
-e SITE_BASE_URL=http://site \