Skip to content
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

Add unit test coverage for logging and restlogger #11

Draft
wants to merge 1 commit into
base: toma/refactorMiddleware
Choose a base branch
from

Conversation

toma3233
Copy link
Contributor

@toma3233 toma3233 commented May 30, 2024

Adds unit test coverage for recent changes in logging and REST API call logging functionalities.

  • Introduces unit tests for logging/logging.go:
    • Tests the GetMethodInfo function with various HTTP methods and URL patterns to ensure accurate logging information is generated for both READ and LIST operations.
  • Implements unit tests for restlogger/restlogger.go:
    • Validates the RoundTrip method of LoggingRoundTripper, ensuring proper logging of HTTP request and response details, including error scenarios.
    • Utilizes a mock HTTP server to simulate responses and errors for comprehensive testing.

For more details, open the Copilot Workspace session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant