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 tests for MiddlewareLoggingPostMux function #79

Merged
merged 1 commit into from
May 2, 2024

Conversation

AldoFusterTurpin
Copy link

@AldoFusterTurpin AldoFusterTurpin commented Apr 29, 2024

What this PR does

Before this PR:
We were already generating the appropriate RequestID in the middleware and passing the correlation data to the context, but with a minor error in the setting of the "resource_id" log attribute in MiddlewareLoggingPostMux()(frontend/middleware_logging.go). We were also missing unit tests for the functionality.

After this PR:
We have unit tests for the functionality and we have fixed the minor "resource_id" log attribute error.

Jira

Special notes for your reviewer

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required
  • Deployment: The deployment process was considered and addressed if required
  • Testing: New code requires new unit tests.
  • Documentation: Is the documentation updated? Either in the doc located in focus area, in the README or in the code itself.
  • Customers: Is this change affecting customers? Is the release plan considered?

@AldoFusterTurpin AldoFusterTurpin self-assigned this Apr 29, 2024
internal/api/arm/correlation.go Outdated Show resolved Hide resolved
frontend/middleware_logging_test.go Outdated Show resolved Hide resolved
frontend/middleware_logging.go Outdated Show resolved Hide resolved
@s-amann s-amann merged commit ecaa300 into Azure:main May 2, 2024
3 checks passed
@AldoFusterTurpin AldoFusterTurpin deleted the frontend-correlation-data branch May 3, 2024 08:20
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.

3 participants