Skip to content

chore: add a Bruno collection covering every API route - #206

Merged
Emmyt24 merged 1 commit into
mainfrom
chore/add-bruno-api-test-collection
Aug 3, 2026
Merged

chore: add a Bruno collection covering every API route#206
Emmyt24 merged 1 commit into
mainfrom
chore/add-bruno-api-test-collection

Conversation

@Emmyt24

@Emmyt24 Emmyt24 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

A Bruno collection (free, open-source, git-friendly plain-text .bru files — https://usebruno.com) covering every route wired into the router: auth, wallets, addresses, payment links (both the owner-authenticated side and the public checkout side), webhooks, sponsorship, and whitelist.

Requests chain automatically via post-response scripts — signup saves a token, wallet creation saves a wallet_id, payment-link creation saves the slug/checkout URL/id — so a full signup → create wallet → create payment link → pay flow runs top to bottom with no manual copy-paste. Two environments (Local, Production) are included; Production points at the live octo-backend-ornz.onrender.com deploy.

Verified live, not just written: signed up, created a wallet, and created a payment link against production. Confirms the ownership-challenge flow, wallet creation, and PUBLIC_APP_URL (the checkout URL fix from a recent PR) are all genuinely working end-to-end — the created link's url came back as https://www.octohq.org/pay/<slug>, which resolves with a real 200.

Also includes api-tests/scripts/sign-challenge.js: wallet registration needs an ed25519 signature over a server-issued challenge (the server never sees the private key — that's the non-custodial guarantee), which Bruno can't produce on its own. This small Node script (using @stellar/stellar-base, already a frontend dependency) generates a keypair, signs a challenge, and prints a ready-to-paste request body.

Test plan

  • Manually verified .bru syntax against Bruno's own documentation (dynamic variables, script API, file format)
  • Brace-balance check across all 34 request files
  • Live smoke test against production: signup → get challenge → sign it (via the companion script) → create wallet (201) → create payment link (201, real url) → confirmed the URL resolves (200)

Answers "how do we test all our APIs" concretely: every route wired
in the router (auth, wallets, addresses, payment links -- both the
owner-authenticated and public checkout sides -- webhooks,
sponsorship, whitelist) has a request here, with response scripts
that auto-chain tokens/ids between requests so a full signup ->
create wallet -> create payment link -> pay flow can be run top to
bottom without manual copy-paste.

Verified live: signed up, created a wallet, and created a payment
link against the production Render deployment (octo-backend-ornz)
-- confirms the ownership-challenge flow, wallet creation, and the
checkout url (PUBLIC_APP_URL) are all genuinely working end-to-end,
not just passing unit tests.

Includes api-tests/scripts/sign-challenge.js: wallet registration
needs an ed25519 signature over a server-issued challenge, which
Bruno can't produce on its own since the private key never touches
Octo. This small Node script (using @stellar/stellar-base, already a
frontend dependency) generates a keypair, signs a challenge, and
prints a ready-to-paste Create Wallet body.
@Emmyt24
Emmyt24 merged commit 02d1ffe into main Aug 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant