Files
computer-playbook/scripts/tests/deploy/act/shell_node.sh
T
kevinveenbirkenbachandClaude Fable 5 5af4b081df refactor(swarm-tests): move teardown and topology under utils, drop shell rescue collector
routine/08_cleanup.sh becomes utils/clean/teardown.sh and topology/
becomes utils/topology/ so routine/ holds only the sequenced flow; all
consumers (workflow steps, compose/swarm.yml env guards, relative
sources, README) follow. The shell rescue collector and its lint are
gone: utils/diagnostics/container.py covers compose and swarm
identically. extend_inventory gains the backup-host placements the DR
drill deploys.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 03:15:53 +02:00

19 lines
594 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# shellcheck source=scripts/tests/deploy/swarm/utils/topology/base.sh
. "$(dirname "$0")/../swarm/utils/topology/base.sh"
node="${node:-${MGR}}"
if ! docker inspect --format '{{.State.Running}}' "${node}" 2>/dev/null | grep -q '^true$'; then
echo "ERROR: container '${node}' is not running." >&2
echo "Available swarm-test containers (if any):" >&2
docker ps --format ' {{.Names}}\t{{.Status}}' |
grep -E 'swarm-|nfs-server' >&2 ||
echo " (none — run \`make swarm-zombie app=<id>\` first)" >&2
exit 1
fi
exec docker exec -it "${node}" bash