feat(prices): commit smoke test scaffold for /v1/prices (Phase A) #173

Merged
maximus merged 1 commit from issue-161-smoke-scaffold into main 2026-04-29 10:25:37 +00:00
Owner

Summary

Phase A of #161 (price-fetching production wiring + release smoke).

This PR commits the smoke test scaffold for /v1/prices so it is reproducible before each release, but does not run it — /v1/prices is not yet implemented in production (404 today on https://api.lacompagniemaximus.com/v1/prices). The smoke will be run for real in Phase B once maximus-api/prices-proxy ships.

Files

  • tests/smoke/prices.sh (new, executable) — 4-case smoke (stock 200 / crypto 200 / invalid 404 / no-auth 401) with jq assertions and set -euo pipefail. Reads MAXIMUS_API_TEST_TOKEN from env (never committed); supports MAXIMUS_API_URL and SMOKE_DATE overrides.
  • tests/smoke/README.md (new) — env var table, two paths for obtaining a premium test token (admin endpoint TODO in maximus-api, manual JWT signing as current workaround), live status note explaining the expected 404 today.

Status (intentional)

This PR does not include Fixes #161 because Phase B is still required to actually close the issue:

  • Phase A — smoke script committed, README documented, CSP verified, suites green
  • Phase B — runs the smoke against a live /v1/prices, then /release cuts v0.9.0

Issue #161 stays open after merge, label status:in-progress. Phase B re-opens via a separate /fix-issue 161 once the maximus-api dependencies are unblocked.

Verification

  • bash -n tests/smoke/prices.sh — syntax OK
  • chmod +x tests/smoke/prices.sh set in commit
  • Dry-run with no token — exits 2 with the expected error message
  • CSP whitelist verified (src-tauri/tauri.conf.json already includes https://api.lacompagniemaximus.com)
  • npx vitest run — 492/492 green
  • cargo test --lib — 69/69 green

Test plan

  • Bash syntax check
  • Token-missing exit code (2)
  • No app code touched, suites still pass
  • Phase B: actual smoke against prod once maximus-api/prices-proxy ships and a premium test token is provisioned

Refs #161

## Summary Phase A of #161 (price-fetching production wiring + release smoke). This PR commits the smoke test scaffold for `/v1/prices` so it is reproducible before each release, but does **not** run it — `/v1/prices` is not yet implemented in production (404 today on `https://api.lacompagniemaximus.com/v1/prices`). The smoke will be run for real in Phase B once `maximus-api/prices-proxy` ships. ## Files - `tests/smoke/prices.sh` (new, executable) — 4-case smoke (stock 200 / crypto 200 / invalid 404 / no-auth 401) with `jq` assertions and `set -euo pipefail`. Reads `MAXIMUS_API_TEST_TOKEN` from env (never committed); supports `MAXIMUS_API_URL` and `SMOKE_DATE` overrides. - `tests/smoke/README.md` (new) — env var table, two paths for obtaining a premium test token (admin endpoint TODO in maximus-api, manual JWT signing as current workaround), live status note explaining the expected 404 today. ## Status (intentional) This PR does **not** include `Fixes #161` because Phase B is still required to actually close the issue: - [x] Phase A — smoke script committed, README documented, CSP verified, suites green - [ ] Phase B — runs the smoke against a live `/v1/prices`, then `/release` cuts `v0.9.0` Issue #161 stays open after merge, label `status:in-progress`. Phase B re-opens via a separate `/fix-issue 161` once the maximus-api dependencies are unblocked. ## Verification - [x] `bash -n tests/smoke/prices.sh` — syntax OK - [x] `chmod +x tests/smoke/prices.sh` set in commit - [x] Dry-run with no token — exits 2 with the expected error message - [x] CSP whitelist verified (`src-tauri/tauri.conf.json` already includes `https://api.lacompagniemaximus.com`) - [x] `npx vitest run` — 492/492 green - [x] `cargo test --lib` — 69/69 green ## Test plan - [x] Bash syntax check - [x] Token-missing exit code (2) - [x] No app code touched, suites still pass - [ ] **Phase B**: actual smoke against prod once maximus-api/prices-proxy ships and a premium test token is provisioned Refs #161
maximus added 1 commit 2026-04-29 01:31:59 +00:00
feat(prices): commit smoke test scaffold for /v1/prices
All checks were successful
PR Check / rust (pull_request) Successful in 22m30s
PR Check / frontend (pull_request) Successful in 2m24s
e0844f0f34
Phase A of #161: ships the smoke script and README before the
maximus-api prices-proxy endpoint is live in prod. The script will
fail on case 1 (HTTP 404) until /v1/prices is implemented and
deployed — that is expected; running it is gated to Phase B (after
prices-proxy ships, before cutting v0.9.0).

Script covers 4 cases:
  1. Stock happy path (AAPL) — HTTP 200, .price > 0
  2. Crypto happy path (BTC) — HTTP 200, .price > 0
  3. Invalid symbol — HTTP 404, error.code=symbol_not_found
  4. Missing auth — HTTP 401, error.code=missing_token

`set -euo pipefail`, exits non-zero on first failure. Reads token
from MAXIMUS_API_TEST_TOKEN env var (never committed). README
documents env vars and the two paths for obtaining a premium test
token (admin endpoint TODO in maximus-api, manual JWT signing as
current workaround).

CSP whitelist for https://api.lacompagniemaximus.com is already in
place in src-tauri/tauri.conf.json — verified, no change needed.

No application code touched; npm test (492) and cargo test --lib
(69) remain green.

Phase A only (#161)
maximus added the
status:review
type:feature
source:human
labels 2026-04-29 01:31:59 +00:00
maximus merged commit 67c48029a0 into main 2026-04-29 10:25:37 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: maximus/Simpl-Resultat#173
No description provided.