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
./scripts/mq-integration-local.sh
echo "P1 local F09 checks passed (business-module coverage only; see docs/evidence/f09-local-acceptance-v0.2.md); external SaaS/management, cloud, supplier, SIP, F06 deployment, and production acceptance remain unverified"