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
Add unittest for describe secret #46341
Add unittest for describe secret #46341
Conversation
Hi @zhangxiaoyu-zidif. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with 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/test-infra repository. I understand the commands that are listed here. |
/ok-to-test |
/retest |
/test pull-kubernetes-federation-e2e-gce |
@fabianofranz |
if err != nil { | ||
t.Errorf("unexpected error: %v", err) | ||
} | ||
if !strings.Contains(out, "bar") || !strings.Contains(out, "foo") || !strings.Contains(out, "username") || !strings.Contains(out, "8 bytes") || !strings.Contains(out, "password") || !strings.Contains(out, "16 bytes") { |
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.
You might want to make it explicitly sure the describer is not including the sensitive data, e.g || strings.Contains(out, MWYyZDFlMmU2N2Rm)
.
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.
Yes, sir. I just check the that only shows number of char. of classified info.
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.
And need I add some test to check if these sensitive info exist?
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.
Yes, explicitly check for the presence of the sensitive data that's not supposed to be present on the output, and error out if it's there.
@fabianofranz |
/retest |
/test pull-kubernetes-e2e-kops-aws |
@fabianofranz |
ping @fabianofranz |
/test pull-kubernetes-bazel-build |
@fabianofranz |
Thanks @zhangxiaoyu-zidif! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabianofranz, zhangxiaoyu-zidif Associated issue requirement bypassed by: fabianofranz The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest |
/test pull-kubernetes-e2e-gce-device-plugin-gpu |
/test pull-kubernetes-bazel-test |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
add unittest for describe secret
Release note: