mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
5 hours ago ede1b306bc6f3ff2332e0cf31f6f5be1082b1217
refs
author Valery Kharseko <vharseko@3a-systems.ru>
Thursday, November 26, 2026 11:33 +0100
committer GitHub <noreply@github.com>
Thursday, November 26, 2026 11:33 +0100
commitede1b306bc6f3ff2332e0cf31f6f5be1082b1217
tree dd1e4f8504cc7a7a117a62aa756c72016653c9c9 tree | zip | gz
parent 4a462adaa29230742739b64af01ceea01d1ee560 view | diff
Stop Cassandra and Postgres after LDAP CI tests (#1332)

## Summary

- Stop Cassandra and PostgreSQL when their LDAP test steps exit,
including when a test fails.
- Free their resources before the Linux replication test. Docker removes
both containers after they stop because they run with `--rm`.
- Stop each container by ID. If Docker confirms that the container is no
longer running, preserve the LDAP step's exit status. If cleanup fails
and the container is still running or its state is unknown, log the
error and fail an otherwise successful step. A failed LDAP step keeps
its original exit code.

## Verification

- All 20 Bash scenarios passed with stubbed Docker and OpenDJ commands.
They cover both databases, failed starts, readiness timeouts, LDAP
failures, automatic removal, and cleanup failures.
- `actionlint`, ShellCheck on the cleanup script, and `git diff --check`
passed. Running ShellCheck across the workflow produced the same
diagnostics as before the change.
- The local Docker daemon was unavailable for a run with real
containers.
1 files modified
1 files added
40 ■■■■■ changed files
.github/scripts/stop-test-container.sh 34 ●●●●● diff | view | raw | blame | history
.github/workflows/build.yml 6 ●●●●● diff | view | raw | blame | history