fix: accept empty attachment_ids, normalize member uuid case, reject repeated query params

This commit is contained in:
2026-11-01 17:51:37 +03:00
parent 210ff67c01
commit 8f8c89cb19
8 changed files with 239 additions and 14 deletions
+3 -2
View File
@@ -1,9 +1,10 @@
#!/bin/sh
set -eu
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
project="${COMPOSE_PROJECT_NAME:-messenger-lab3}"
labels=$(docker inspect -f '{{index .Config.Labels "com.docker.compose.project"}}/{{index .Config.Labels "com.docker.compose.service"}}' "$TARGET_INSTANCE_ID")
if [ "$labels" != "messenger-lab3/api" ]; then
echo "refusing to stop $TARGET_INSTANCE_ID: not an api replica of messenger-lab3 ($labels)" >&2
if [ "$labels" != "$project/api" ]; then
echo "refusing to stop $TARGET_INSTANCE_ID: not an api replica of $project ($labels)" >&2
exit 1
fi
docker stop -t 8 "$TARGET_INSTANCE_ID" >/dev/null