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

Move request logger to pkg/middleware and add tests #2111

Merged
merged 1 commit into from May 9, 2019

Conversation

2 participants
@pjdufour-truss
Copy link
Contributor

commented May 9, 2019

Description

This PR moves the request logger to the pkg/middleware package and adds tests. Using zaptest and zapcore.NewTee, I'm able to duplicate the logging output to a test logger and a buffer that can be read from to confirm the middleware is writing to the logger.

Reviewer Notes

Is there anything you would like reviewers to give additional scrutiny?

Setup

None

Code Review Verification Steps

  • Code follows the guidelines for Logging
  • The requirements listed in
    Querying the Database Safely
    have been satisfied.
  • Any new migrations/schema changes:
    • Follow our guidelines for zero-downtime deploys (see Zero-Downtime Deploys)
    • Have been communicated to #dp3-engineering
    • Secure migrations have been tested using scripts/run-prod-migrations
  • There are no aXe warnings for UI.
  • This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
  • Any new client dependencies (Google Analytics, hosted libraries, CDNs, etc) have been:
  • Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
  • User facing changes have been reviewed by design.
  • Request review from a member of a different team.
  • Have the Pivotal acceptance criteria been met for this change?

References

None

Screenshots

None

@chrisgilmerproj
Copy link
Contributor

left a comment

🚀

@codecov

This comment has been minimized.

Copy link

commented May 9, 2019

Codecov Report

Merging #2111 into master will increase coverage by <.01%.
The diff coverage is 59.46%.

@@            Coverage Diff             @@
##           master    #2111      +/-   ##
==========================================
+ Coverage   60.31%   60.31%   +<.01%     
==========================================
  Files         229      230       +1     
  Lines       13325    13378      +53     
==========================================
+ Hits         8036     8068      +32     
- Misses       4318     4335      +17     
- Partials      971      975       +4

@pjdufour-truss pjdufour-truss merged commit 3ef554d into master May 9, 2019

19 of 20 checks passed

codecov/patch 59.46% of diff hit (target 60.31%)
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
ci/circleci: acceptance_tests_experimental Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_local Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_staging Your tests passed on CircleCI!
Details
ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: build_tasks Your tests passed on CircleCI!
Details
ci/circleci: build_tools Your tests passed on CircleCI!
Details
ci/circleci: client_test Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_api Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_mymove Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_office Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_tsp Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details
ci/circleci: server_test Your tests passed on CircleCI!
Details
ci/circleci: server_test_coverage Your tests passed on CircleCI!
Details
codecov/project/go 60.15% (+<.01%) compared to b439157
Details

@pjdufour-truss pjdufour-truss deleted the request_logger branch May 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.