fix(api): define COMPOSE_FILE so the leftover diagnosis actually runs
52c31a68 added a per-leftover refcount dump to storage_cleanup_check.sh but referenced COMPOSE_FILE, which that script never defines — only thumb_import_check.sh does. It would have run `docker compose -f ""`, failed, and been swallowed by the `|| true` guarding the loop. A silent no-op: the diagnosis would print nothing and the failure would look exactly as uninformative as the one it was written to explain. The same shape as the three bugs this suite has already caught — an error dressed up as an unremarkable result — and I wrote it into the tool meant to find them. The `|| true` stays, so one unreadable blob cannot abort the loop before the others report.
This commit is contained in:
@@ -18,6 +18,10 @@ set -euo pipefail
|
|||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||||
STORAGE_PATH="${OXICLOUD_STORAGE_PATH:-$REPO_ROOT/tests/api/storage}"
|
STORAGE_PATH="${OXICLOUD_STORAGE_PATH:-$REPO_ROOT/tests/api/storage}"
|
||||||
|
# Needed by the leftover diagnosis below. Without it `docker compose -f ""`
|
||||||
|
# fails and the `|| true` there swallows it, so the diagnosis silently prints
|
||||||
|
# nothing and the failure looks exactly as uninformative as before.
|
||||||
|
COMPOSE_FILE="$REPO_ROOT/tests/common/docker-compose.test.yml"
|
||||||
|
|
||||||
# shellcheck source=test.env
|
# shellcheck source=test.env
|
||||||
source "$SCRIPT_DIR/test.env"
|
source "$SCRIPT_DIR/test.env"
|
||||||
|
|||||||
Reference in New Issue
Block a user