-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix metrics auth token detection #6006
Conversation
Signed-off-by: Pauls Barkans <[email protected]>
Thanks for PR @barkap, would you be able to add a test for this? |
Codecov Report
@@ Coverage Diff @@
## master #6006 +/- ##
=======================================
Coverage 38.72% 38.72%
=======================================
Files 332 332
Lines 48992 48992
=======================================
Hits 18973 18973
Misses 27271 27271
Partials 2748 2748
Continue to review full report at Codecov.
|
I'm not too familiar with gitea as a whole and existing go tests mostly fail for me so I'm probably unable to write new test with mocks for this package at the time. |
@barkap that's ok, thanks for explaining. My computer is so low powered that I rely on drone for running my tests as otherwise it'd be >1.5hours just to test against sqlite 😢 maybe it is time for me to get a new computer 🤔 Would you be able to send a backport of this PR against the |
Yes, I'll send pr in a bit. Thank you. |
Signed-off-by: Pauls Barkans <[email protected]>
Backport of #6006 Signed-off-by: Pauls Barkans <[email protected]>
Metrics token authorization currently does not work with token and metrics enabled in config. There's always 401 response without any data. This fixes header detection.