-
Notifications
You must be signed in to change notification settings - Fork 94
Improve test-coverage on blobplugin #2148
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
Improve test-coverage on blobplugin #2148
Conversation
Refs: kubernetes-sigs#703 Signed-off-by: Tobias Harnickell <[email protected]>
…/blob-csi-driver into blobplugin-servemetrics-test
Welcome @TobyTheHutt! |
Hi @TobyTheHutt. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
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.
Pull Request Overview
This PR adds unit test coverage for the serveMetrics
function in the blobplugin package to improve test coverage.
- Adds a comprehensive test for the
serveMetrics
function that validates HTTP server startup, metrics endpoint availability, and graceful shutdown - Includes proper error handling, timeout mechanisms, and resource cleanup in the test implementation
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
if err != nil { | ||
t.Fatalf("read body: %v", err) | ||
} | ||
// Validate response body is non-empty |
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.
This comment is duplicated on lines 156 and 161. Remove the duplicate comment to avoid redundancy.
// Validate response body is non-empty |
Copilot uses AI. Check for mistakes.
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, TobyTheHutt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind test
What this PR does / why we need it:
Tests the
serveMetrics
function in the blobplugin.Which issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
Release note: