Files
go-sip/scripts/acceptance-local.sh
T

34 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
cd "$ROOT"
unformatted=$(find contracts internal cmd -type f -name '*.go' -print0 | xargs -0 gofmt -l)
if [[ -n "$unformatted" ]]; then
printf 'Go files need gofmt:\n%s\n' "$unformatted" >&2
exit 1
fi
if grep -R -n -E -- '--tenant-key|--consume|DISPATCHER_TENANT_KEY' deploys/systemd deploys/env; then
echo "obsolete tenant-queue CLI configuration remains in deployment templates" >&2
exit 1
fi
if [[ -e scripts/mq-only-acceptance-local.sh ]]; then
echo "obsolete MQ-only acceptance runner remains" >&2
exit 1
fi
./scripts/check-contracts.sh
go mod verify
go test -race ./... -count=1
go vet ./...
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
go build -trimpath -buildvcs=false -o "$tmp/sip-go-agent" ./cmd/sip-go-agent
bash scripts/check-current-mq-mock.sh
echo "Current single-node Mock checks passed; see docs/evidence/saas-dispatcher-implementation.md. External SaaS, OSS, AI, Asterisk, SIP, non-production host diagnostics and production acceptance remain unverified."