Skip to content

Add helper for building a test HTTP request with all required auth headers pre-populated #552

Description

@Chucks1093

Summary

Integration tests that hit auth-protected endpoints need to attach a valid wallet signature header on every request. Building these headers manually in each test is repetitive. A shared test request builder should handle auth header construction so tests focus on the scenario being tested.

Scope

  • Add buildAuthRequest(method, path, body, walletKeypair) test helper
  • Signs the request body with the provided keypair and attaches the X-Wallet-Signature header
  • Returns a pre-configured request object ready for the test HTTP client
  • Add a unit test confirming the generated header passes the signature verification middleware

Acceptance Criteria

  • Helper attaches correct signature header
  • Generated request passes signature verification middleware
  • Works for POST and DELETE methods

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions