Add unit tests for metrics server setup
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 1.1k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 39
Description
### What you would like to be added?
Add unit tests for `pkg/metrics/setup.go` to verify the behavior of `SetupServer`
The tests should cover:
* Metrics server setup with different serving configs
* Behavior when the metrics server is disabled
* Authentication related setup
* Successful registration of the metrics server with the manager
* Error handling when server registration fails
### Why is this needed?
`SetupServer` currently does not have dedicated unit tests
Adding tests will help verify that the metrics server is configured and registered correctly and will make future changes safer by catching unexpected behavior
### Love this feature?
Give it a 👍 We prioritize the features with most 👍
Contributor guide
Assessment
This issue has not been assessed yet.