-
Notifications
You must be signed in to change notification settings - Fork 459
test/added tests for V700 #2665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
fix Github Action
- Add Http4sCallContextBuilderTest with 454 lines of test coverage - Test URL extraction including path, query parameters, and path parameters - Test header extraction and conversion to HTTPParam format - Test body extraction for POST, PUT, and GET requests - Test correlation ID generation and extraction from X-Request-ID header - Test IP address extraction from X-Forwarded-For and direct connection - Test authentication header extraction for all supported auth types - Test error handling and edge cases in CallContext building - Ensure Http4sCallContextBuilder correctly processes http4s Request[IO] objects
- Add comprehensive test suite for ResourceDocMatcher with 545 lines of test coverage - Test exact path matching for GET, POST, and multi-segment paths - Test verb and path mismatch scenarios returning None - Test BANK_ID variable matching and parameter extraction - Test BANK_ID + ACCOUNT_ID variable matching and extraction - Test BANK_ID + ACCOUNT_ID + VIEW_ID variable matching and extraction - Test COUNTERPARTY_ID variable matching and extraction - Test non-matching request scenarios - Ensure ResourceDocMatcher correctly identifies and extracts path parameters for all variable types - Use FeatureSpec with Given-When-Then style for clear test documentation
…and improve validation DSL - Ensure all responses (errors and successful) have JSON Content-Type - Replace repeated EitherT patterns with a clean Validation DSL (success/failure) - Add ValidationContext to accumulate user, bank, account, view, and counterparty entities - Add detailed comments for authentication, authorization, and entity validation steps - Simplify middleware logic while preserving original validation order and behavior
This reverts commit 3a264ed.
- Safely extract request headers using `S.request.map(...).openOr(Nil)` instead of `openOrThrowException` - Add proper error handling for resource-docs endpoint using `ErrorResponseConverter` - Extract query parameters directly from URI instead of parsing URL string - Add comprehensive test suite for Http4s700 routes
Move role-based authorization for resource-docs endpoint from endpoint implementation to ResourceDocMiddleware. This ensures consistent authentication handling across all endpoints and removes duplicate authorization logic. The middleware now checks the `resource_docs_requires_role` property and enforces the `canReadResourceDoc` role when enabled. Tests are updated to verify proper 403 responses with missing role messages.
|
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.


No description provided.