test: enhance settlement and auth JWT integration tests - #430
Merged
chizzy192 merged 1 commit intoAug 30, 2026
Merged
Conversation
- Add edge case tests for settlement: non-existent invoice, zero/negative proceeds, wrong invoice status, no confirmed investments - Add ServiceError code and statusCode verification for settlement failures - Add pro-rata distribution edge cases: three-way split, excess/deficit proceeds, result structure validation - Add logging verification for lifecycle transitions and settlement completion on both success and failure paths - Add malformed token tests: random strings, two-part tokens, empty strings, invalid base64 - Add algorithm attack tests: none algorithm, wrong HS256 secrets, alg-switch attacks - Add missing claims tests: no sub, empty sub, non-existent user, non-string sub - Add Authorization header edge cases: lowercase bearer, no prefix, wrong scheme, extra whitespace - Add error response structure verification for all failure scenarios - Add token timing edge cases: future nbf, long-lived tokens Closes StellarState#350 Closes StellarState#351 Closes StellarState#352 Closes StellarState#353
|
@Marvy247 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Enhances
settlement.integration.test.tsandauth-jwt-validation.test.tswith comprehensive edge case coverage, error handling verification, and logging assertions.Settlement integration tests (Issues #350, #351, #352)
INVALID_PROCEEDS,INVOICE_NOT_FOUND,INVALID_INVOICE_STATUS,NO_CONFIRMED_INVESTMENTS) and HTTP status codes on failure pathsconfirmInvestmentandfullyFundInvoiceutilities to reduce boilerplateAuth JWT validation tests (Issue #353)
nonealgorithm, wrong HS256 secrets, alg-switch header tamperingsubclaim, emptysub, non-existent user, non-stringsubvaluesbearer, raw token without prefix,Tokenscheme instead ofBearer, extra whitespacenbf, long-lived valid tokensAcceptance Criteria
settlement.integration.test.tsis optimized and hardenedauth-jwt-validation.test.tsis optimized and hardeneddevbranchReferences