27 lines
1.7 KiB
Bash
Executable file
27 lines
1.7 KiB
Bash
Executable file
#!/usr/bin/env bash
|
||
# ⚠ Пробы лежат как *_test.go.txt: внутри `platform/docs/` файл с расширением .go ломает
|
||
# `go vet ./...` и `gofmt -l` конфликтом пакетов. Скрипт копирует их обратно под именем .go.
|
||
# P8-REVIEW axis 3 (queue and jobs) — every claim of the report, re-run from scratch.
|
||
#
|
||
# It installs three probe FILES (test-only, no production code touched) into a platform tree and
|
||
# runs them. Point PLATFORM at a copy, never at the live repository.
|
||
#
|
||
# PLATFORM=/path/to/copy/platform TM_PLATFORM_TEST_DSN=... ./run-probes.sh
|
||
set -euo pipefail
|
||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||
PLATFORM="${PLATFORM:-$HERE/../platform}"
|
||
: "${TM_PLATFORM_TEST_DSN:?set TM_PLATFORM_TEST_DSN (a Postgres the tests may create scratch databases in)}"
|
||
|
||
cp "$HERE/probe_settlement_surface_test.go.txt" "$PLATFORM/internal/runs/zz_p8rev_probe_test.go"
|
||
cp "$HERE/probe_sweep_serialisation_test.go.txt" "$PLATFORM/cmd/tmplatformd/zz_p8rev_sweep_probe_test.go"
|
||
cp "$HERE/probe_drain_budget_pair_test.go.txt" "$PLATFORM/internal/readmodel/zz_p8rev_drain_probe_test.go"
|
||
|
||
cd "$PLATFORM"
|
||
echo "### F1/F2/F5 — the settlement half of the P8-FIX treatment"
|
||
go test ./internal/runs/ -run 'TestProbe' -count=1 -v 2>&1 | grep -E '^(=== RUN| zz_|--- )'
|
||
echo
|
||
echo "### F3 — the runs pass runs once per SUM of every pass, not once per SweepEvery"
|
||
go test ./cmd/tmplatformd/ -run 'TestProbeTheRunsPass' -count=1 -v 2>&1 | grep -E '^( zz_|--- )'
|
||
echo
|
||
echo "### F4 — refreshSweepBudget and readmodel.MaterializeBudget are an unpinned pair"
|
||
go test ./internal/readmodel/ -run 'TestProbeAPassShorter' -count=1 -v 2>&1 | grep -E '^( zz_|--- )'
|