Fix metrics auth token detection#6006
Conversation
Signed-off-by: Pauls Barkans <paulsb@gmail.com>
|
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 <paulsb@gmail.com>
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.