[W-22393691] code-analyzer-core | implement curl for the apex guru call#470
Open
nikhil-mittal-165 wants to merge 6 commits into
Conversation
Add comprehensive test coverage for new curlRequest method: - GET request with correct headers and URL construction - POST request with body serialization - Error handling for non-200 HTTP responses - Network error handling with descriptive messages Tests verify Authorization Bearer pattern and Content-Type headers.
…request Update ApexGuruService.test.ts validate tests: - Mock authService.curlRequest instead of connection.request - Verify curlRequest called with correct method and path - Maintain test coverage for success, failure, and timeout scenarios - Add curlRequest mock to authService setup Make curlRequest public for testability.
Update all remaining ApexGuruService tests to use mockAuthService.curlRequest: - analyzeApexClass tests for submit and poll operations - Progress callback test - Report parsing test - Timeout handling test - scanMetadata extraction test All 20 tests now passing with curlRequest pattern.
Remove Connection import that's no longer used after replacing connection.request calls with authService.curlRequest. Connection is still used in ApexGuruAuthService for getConnection() method, but not in ApexGuruService anymore. All 62 apexguru-engine tests passing.
Add comprehensive integration tests verifying: - curlRequest used for all ApexGuru API calls (validate, submit, poll) - Correct HTTP methods (GET, POST) and URLs for each endpoint - Base64 encoding of Apex class content in POST body - Full flow from validate through analyzeApexClass with polling All 64 apexguru-engine tests passing.
|
Git2Gus App is installed but the |
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
Implements curl-based HTTP client for ApexGuru API calls to replace Connection.request dependency.
Ticket Subject
code-analyzer-core | implement curl for the apex guru call
Base Branch
feature/W-22393691-apexguru-insights-integration
Commits
Design Rationale
This implementation provides a curl-based HTTP client for ApexGuru API interactions, enabling direct HTTP requests without reliance on the Connection class. The approach includes:
Test Evidence
Dependencies
Depends on: #468