-
Notifications
You must be signed in to change notification settings - Fork 61
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
🐛 Client go version metrics endpoint test #1821
🐛 Client go version metrics endpoint test #1821
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
ecfef0f
to
dce13b3
Compare
Hmm, I pulled |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1821 +/- ##
==========================================
+ Coverage 68.39% 68.45% +0.05%
==========================================
Files 63 63
Lines 5136 5136
==========================================
+ Hits 3513 3516 +3
+ Misses 1392 1390 -2
+ Partials 231 230 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
require.Contains(c.t, string(output), "200 OK", "Metrics endpoint did not return 200 OK") | ||
// Combine stdout + stderr | ||
combined := stdout.String() + stderr.String() | ||
require.Contains(c.t, combined, "200 OK", "Metrics endpoint did not return 200 OK") |
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.
Is it not much more complex than before?
I think before it was very clear what it does, we could easily copy and paste to validate the things.
But anyone, maybe it is a matter of preference. So, OK with ANY
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.
yeah Idk, it was certainly harder to implement, kubectl exec
was doing several things for us. I think this PR mostly just answers @joelanford concern that that help from kubectl
also opened more avenues for things to go subtly wrong. And @azych desire that this test should use go-client
like the other e2e.
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.
I could see wrapping this in a more general purpose execInPod
kind of utility function that could be re-used. But mostly a nit since there's not another place that we need this at the moment.
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.
LGTM, just added a few nits
8f5b7eb
to
15a1c2a
Compare
Signed-off-by: Brett Tofel <[email protected]>
test/utils.go deleted because no used funcs Signed-off-by: Brett Tofel <[email protected]>
Signed-off-by: Brett Tofel <[email protected]>
Signed-off-by: Brett Tofel <[email protected]>
Signed-off-by: Brett Tofel <[email protected]>
Signed-off-by: Brett Tofel <[email protected]>
Have to have package filter too, to not run all the unit tests due to UNIT_TEST_DIRS Signed-off-by: Brett Tofel <[email protected]>
Signed-off-by: Brett Tofel <[email protected]>
15a1c2a
to
e82ebca
Compare
Signed-off-by: Brett Tofel <[email protected]>
fed0ad5
This reverts commit fed0ad5.
Description
This PR rewrites the metrics endpoint e2e test using client-go. It maintains the recent change to the kubectl exec version by still "force" deleting the Pod (0 time grace period). Seems to pass a local 10 of 10 in a row e2e test.
Added an optional TEST_FILTER env var to the e2e run in the Makefile. Not really related but sure is better when you're iterating on one e2e test change.
Reviewer Checklist