chore: add a Bruno collection covering every API route - #206
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Bruno collection (free, open-source, git-friendly plain-text
.brufiles — 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.comdeploy.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'surlcame back ashttps://www.octohq.org/pay/<slug>, which resolves with a real200.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
.brusyntax against Bruno's own documentation (dynamic variables, script API, file format)url) → confirmed the URL resolves (200)