cozystack/hack/e2e-apps
Aleksei Sviridkin 67b4180152
[tests] Fix: remove EXIT trap that broke successful kubernetes tests
Root cause: EXIT trap called _k8s_test_cleanup after subshell exit,
but variables ${port} and ${test_name} were not available in that
context. set -u caught the unset variable and exited with error,
marking a successful test as failed. This caused every kubernetes
test to "fail" on attempt 1, then retry 2 more times with real
failures (NFS PVC timeout because the cluster was being deleted).

Fix: remove trap and cleanup function entirely. Pre-cleanup at
test start handles stale resources. Inline cleanup at test end
handles normal path. On failure, resources are cleaned up by
pre-cleanup on the next retry.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-03-24 21:30:06 +03:00
..
backup.bats.disabled [backups] Add templating of velero backups 2026-01-04 13:31:15 +03:00
bucket.bats [tests] Fix port-forward leak and LB retry off-by-one 2026-03-23 17:33:27 +03:00
clickhouse.bats [tests] Add pre-cleanup, fix port-forward race, fix temp leak 2026-03-23 17:25:01 +03:00
external-dns.bats feat(extra): add external-dns as standalone extra package 2026-03-10 12:48:01 +01:00
foundationdb.bats [tests] Add pre-cleanup, fix port-forward race, fix temp leak 2026-03-23 17:25:01 +03:00
harbor.bats fix(harbor): include tenant domain in default hostname and add E2E cleanup 2026-02-18 02:07:38 +03:00
kafka.bats [tests] Add pre-cleanup, fix port-forward race, fix temp leak 2026-03-23 17:25:01 +03:00
kubernetes-latest.bats [ci] Refactor testing logic 2025-07-23 14:00:24 +03:00
kubernetes-previous.bats [ci] Refactor testing logic 2025-07-23 14:00:24 +03:00
mariadb.bats [tests] Add pre-cleanup, fix port-forward race, fix temp leak 2026-03-23 17:25:01 +03:00
mongodb.bats [tests] Add pre-cleanup, fix port-forward race, fix temp leak 2026-03-23 17:25:01 +03:00
openbao.bats [tests] Add pre-cleanup, fix port-forward race, fix temp leak 2026-03-23 17:25:01 +03:00
postgres.bats [tests] Add pre-cleanup, fix port-forward race, fix temp leak 2026-03-23 17:25:01 +03:00
qdrant.bats [tests] Add pre-cleanup, fix port-forward race, fix temp leak 2026-03-23 17:25:01 +03:00
redis.bats [tests] Add pre-cleanup, fix port-forward race, fix temp leak 2026-03-23 17:25:01 +03:00
run-kubernetes.sh [tests] Fix: remove EXIT trap that broke successful kubernetes tests 2026-03-24 21:30:06 +03:00
vminstance.bats [tests] Fix review findings: vminstance pre-cleanup, indentation, --ignore-not-found 2026-03-23 17:42:23 +03:00