Repository navigation
test(api): assert the RI exchange quote and execute library requests - #1916
Conversation
The execute and quote tests asserted the audit row or only the converter, so a body field dropped before the exchange library call would go unnoticed. Send a full body in both shapes (targets array and the legacy singleton fields) and assert every field of the request the handler hands to the library. Part of #1907 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What
Slice 2 of #1907: round-trip tests for the RI exchange quote (
POST /api/ri-exchange/quote) and execute (POST /api/ri-exchange/execute) bodies. The existing tests asserted the audit row or the converter, not the request the handler hands to the exchange library.Each test sends a full body in both shapes (the
targetsarray and the legacytarget_offering_idandtarget_count) and asserts every field of the library request: region, source RI ids, targets, legacy offering and count, and the execute spend cap. Test-only, no production change.Verification
go test ./internal/mocks/passes.Part of #1907
🤖 Generated with Claude Code
Summary by CodeRabbit