-
Notifications
You must be signed in to change notification settings - Fork 692
otelconf: Increased test coverage for Prometheus-related code #7440
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7440 +/- ##
=====================================
Coverage 78.7% 78.8%
=====================================
Files 186 186
Lines 14694 14701 +7
=====================================
+ Hits 11571 11587 +16
+ Misses 2782 2775 -7
+ Partials 341 339 -2 🚀 New features to boost your workflow:
|
@sonalgaud12, are you able to address the comments? |
Co-authored-by: Tyler Yahn <[email protected]>
// localhost resolves to 127.0.0.1, so we expect the resolved IP | ||
assert.Contains(t, addr, "127.0.0.1") | ||
|
||
resp, err := http.DefaultClient.Get("http://" + addr + "/metrics") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resp, err := http.DefaultClient.Get("http://" + addr + "/metrics") | |
resp, err := http.Get("http://" + addr + "/metrics") |
nit, as some of your tests use http.Get
} | ||
} | ||
|
||
func TestPrometheusReaderErrorCases(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use a table-driven approach? Just like the other TestPrometheusReaderErrorCases
method you wrote?
@sonalgaud12, are you able to address @XSAM's comments? |
This PR fixes #6821
Added test for prometheusReader function for both v0.3.0 & v0.2.0
Locally tested