Files
mtusi2026lab7-fork/scripts/check_other_replica.sh
T

11 lines
382 B
Bash
Executable File

#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
replica=$(docker compose ps -q api | xargs docker inspect -f '{{.Name}} {{.Config.Hostname}}' |
awk '$1=="/highload-lab7-api-2" {print $2}')
test -n "$replica"
trap 'docker compose start api >/dev/null' EXIT
TARGET_INSTANCE_ID="$replica" ./scripts/stop-one.sh
./scripts/wait_ingress.sh
make test CA_FILE=secrets/tls/lab7-ingress-ca.crt