Continue-until-done instructions live in Historical-Information.MD. run-review.sh now covers signed-config HTTP and catalog subjects. deploy-ns1.sh never skips tests and does not set PFC_REQUIRE_NPE.
45 lines
1.3 KiB
Bash
Executable file
45 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Run tests for NATS/PFC/messaging repos. Exit non-zero on first failure.
|
|
# Does not deploy to ns1.
|
|
set -euo pipefail
|
|
ROOT="${RESEARCH:-$HOME/research}"
|
|
fail=0
|
|
run() {
|
|
echo "=== $* ==="
|
|
if ! "$@"; then
|
|
echo "FAIL: $*"
|
|
fail=1
|
|
fi
|
|
}
|
|
export PATH="/opt/homebrew/bin:$PATH"
|
|
run env PYTHONPATH="$ROOT/peergos-for-compliance/lib:$ROOT/peergos-for-compliance-admin:$ROOT/secure-messaging/python" \
|
|
python3 -m unittest discover -s "$ROOT/peergos-for-compliance/tests" -v
|
|
run env PYTHONPATH="$ROOT/secure-messaging/python" \
|
|
python3 -m unittest discover -s "$ROOT/secure-messaging/tests" -v
|
|
if [[ -d "$ROOT/secure-messaging/go" ]]; then
|
|
( cd "$ROOT/secure-messaging/go" && run go test ./... )
|
|
fi
|
|
if [[ -f "$ROOT/nats-service-endpoints/catalog/endpoints.json" ]]; then
|
|
run python3 - << PY
|
|
import json
|
|
from pathlib import Path
|
|
p = Path("$ROOT/nats-service-endpoints/catalog/endpoints.json")
|
|
d = json.loads(p.read_text())
|
|
names = {e["name"] for e in d["endpoints"]}
|
|
need = {
|
|
"verae.sm.send",
|
|
"verae.sm.dead",
|
|
"verae.sm.error",
|
|
"verae.sm.log.summary",
|
|
"verae.admin.config.sign",
|
|
}
|
|
missing = sorted(need - names)
|
|
assert not missing, missing
|
|
print("catalog subjects ok", sorted(need))
|
|
PY
|
|
fi
|
|
if [[ "$fail" -ne 0 ]]; then
|
|
echo "REVIEW FAIL"
|
|
exit 1
|
|
fi
|
|
echo "REVIEW PASS (no deploy)"
|