Skeleton contracts / contracts (pull_request) Blocked by required conditions
Smoke/security/grade4/persistence/failover пройдены; REPORT и DEFENSE.
12 lines
590 B
Bash
Executable File
12 lines
590 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
. "$(dirname "$0")/_lib.sh"
|
|
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
|
|
|
|
service=$(docker inspect -f '{{index .Config.Labels "com.docker.compose.service"}}' "$TARGET_INSTANCE_ID" 2>/dev/null || true)
|
|
project=$(docker inspect -f '{{index .Config.Labels "com.docker.compose.project"}}' "$TARGET_INSTANCE_ID" 2>/dev/null || true)
|
|
|
|
[ "$service" = "api" ] || { echo "not an api container" >&2; exit 1; }
|
|
[ "$project" = "gavrilenko-lab7" ] || { echo "container is not from gavrilenko-lab7" >&2; exit 1; }
|
|
|
|
docker stop -t 5 "$TARGET_INSTANCE_ID" >/dev/null |