Skip to content

Commit 17a8bf1

Browse files
committed
test(qa): stop the e2e suite racing a live price API (om-yd1h)
qa/run.sh started `serve` without --spot-provider=none, so the ADR-007 poller fetched api.gold-api.com and appended a spot row at as_of=now. LatestSpot is ORDER BY as_of DESC and the seeded fixture is dated 2026-01-01, so the live market price outranked the fixture and the suite valued against whatever gold did that morning — a third-party network dependency and a mid-run race on the critical path of every PR. Disable the poller; the manual seed is the only spot the suite values against now.
1 parent ddbe7a6 commit 17a8bf1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

qa/run.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ npm install --silent
3232
npx playwright install chromium >/dev/null 2>&1 || echo " (playwright install skipped — relying on PLAYWRIGHT_BROWSERS_PATH)"
3333

3434
echo "▸ serving on ${BASE} (db: ${DB})…"
35-
"$BIN" serve --db "$DB" --addr "127.0.0.1:${PORT}" &
35+
# --spot-provider=none keeps the live gold-api.com poller out of the test path. Left on,
36+
# it appends a spot row at as_of=now; LatestSpot is ORDER BY as_of DESC, so the live market
37+
# price would outrank the 2026-01-01 fixture seeded below and the suite would value against
38+
# whatever gold did today (a network race that can shift valuations mid-run). Manual seed only.
39+
"$BIN" serve --db "$DB" --addr "127.0.0.1:${PORT}" --spot-provider=none &
3640
SRV=$!
3741
cleanup() { kill "$SRV" 2>/dev/null || true; rm -f "$DB"; }
3842
trap cleanup EXIT

0 commit comments

Comments
 (0)