Skip to content
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

Merged
merged 1 commit into from Nov 1, 2017
Merged

Add unittest for describe secret #46341

merged 1 commit into from Nov 1, 2017

Conversation

zhangxiaoyu-zidif
Copy link
Contributor

What this PR does / why we need it:
add unittest for describe secret

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 24, 2017
@k8s-ci-robot
Copy link
Contributor

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 @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 24, 2017
@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels May 24, 2017
@zhangxiaoyu-zidif zhangxiaoyu-zidif changed the title add unittest for describe secret Add unittest for describe secret May 25, 2017
@xiangpengzhao
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 11, 2017
@zhangxiaoyu-zidif
Copy link
Contributor Author

/retest

@zhangxiaoyu-zidif
Copy link
Contributor Author

/test pull-kubernetes-federation-e2e-gce
/test pull-kubernetes-node-e2e

@zhangxiaoyu-zidif
Copy link
Contributor Author

@fabianofranz
PTAL

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") {
Copy link
Contributor

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).

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@zhangxiaoyu-zidif
Copy link
Contributor Author

@fabianofranz
Fixed. PTAL

@zhangxiaoyu-zidif
Copy link
Contributor Author

/retest

@zhangxiaoyu-zidif
Copy link
Contributor Author

/test pull-kubernetes-e2e-kops-aws

@zhangxiaoyu-zidif
Copy link
Contributor Author

@fabianofranz
PTAL

@zhangxiaoyu-zidif
Copy link
Contributor Author

ping @fabianofranz

@BenTheElder
Copy link
Member

/test pull-kubernetes-bazel-build
/test pull-kubernetes-bazel-test

@zhangxiaoyu-zidif
Copy link
Contributor Author

@fabianofranz
PTAL. Thanks!

@fabianofranz
Copy link
Contributor

Thanks @zhangxiaoyu-zidif!
/lgtm
/approve no-issue
/sig cli

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cli Categorizes an issue or PR as relevant to SIG CLI. labels Oct 31, 2017
@k8s-github-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 31, 2017
@zhangxiaoyu-zidif
Copy link
Contributor Author

/retest

@zhangxiaoyu-zidif
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-device-plugin-gpu

@zhangxiaoyu-zidif
Copy link
Contributor Author

/test pull-kubernetes-bazel-test

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit e2c3137 into kubernetes:master Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants