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

Unit Test on RequestId Middleware to validate requests with a X-Request-ID header #1714

Closed
pafuent opened this issue Dec 10, 2020 · 1 comment · Fixed by #1719
Closed

Unit Test on RequestId Middleware to validate requests with a X-Request-ID header #1714

pafuent opened this issue Dec 10, 2020 · 1 comment · Fixed by #1719

Comments

@pafuent
Copy link
Contributor

pafuent commented Dec 10, 2020

Add a new Unit Test to request_id_test.go to check that the middleware doesn't change a preexisting X-Request-ID header on the request.
Basically is a test that exercises the false path of this code

rid := req.Header.Get(echo.HeaderXRequestID)
if rid == "" {
rid = config.Generator()
}

@iambenkay
Copy link
Contributor

I'll work on this and send in a PR

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

Successfully merging a pull request may close this issue.

2 participants