tools/pasture/run.sh up [peer...] | down | logs | ps and interop.sh [peer...] are now built from parts: - lib/pasture.sh: network, Caddy with its CA in a volume and copied to .ca/root.crt, Mongo, PrivaPub; - peers/<name>.sh: each peer's <name>_up; - lib/interop.sh: ok, ko, and xf for checks expected to fail until a later phase; privapub_token <persona>, which gives each peer its own persona under one root; and stats_check; - scenarios/<name>.sh: each peer's checks. GoToSocial is pinned at 0.22.1, the version the 33 checks were proven on. Its scenario gains four statistics checks: - the admin statistics describe gts.test as gotosocial; - they count inbound and outbound traffic; - they name no account. 37/37 passed three runs in a row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ELjqpznMFMNrJoJUj6K5p2
26 lines
1.1 KiB
Bash
Executable File
26 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# A private test fediverse on one podman network: PrivaPub (privapub.test) and the peers asked for, behind one Caddy
|
|
# whose internal CA every side is told to accept (its root is copied to .ca/root.crt). From the workstation: PrivaPub's
|
|
# API at http://127.0.0.1:6971, every site at https://<name>.test:6443 (curl --resolve <name>.test:6443:127.0.0.1 -k).
|
|
# usage: tools/pasture/run.sh up [peer...] | down | logs <name> | ps peers: gts (default)
|
|
set -euo pipefail
|
|
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/lib/pasture.sh"
|
|
|
|
case "${1:-up}" in
|
|
up)
|
|
shift || true
|
|
peers=("${@:-gts}")
|
|
pasture_base_up
|
|
for peer in "${peers[@]}"; do
|
|
[ -f "$here/peers/$peer.sh" ] || { echo "no such peer: $peer" >&2; exit 1; }
|
|
. "$here/peers/$peer.sh"
|
|
"${peer}_up"
|
|
done
|
|
echo "privapub: http://127.0.0.1:6971, https://privapub.test:6443"
|
|
;;
|
|
down) pasture_down ;;
|
|
logs) podman logs --tail 200 "pasture-${2:-privapub}" ;;
|
|
ps) podman ps --filter name=pasture- --format '{{.Names}}\t{{.Status}}' ;;
|
|
*) echo "usage: $0 up [peer...] | down | logs <name> | ps" >&2; exit 2 ;;
|
|
esac
|