-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
test: improve unit tests for container name autocompletion #124916
test: improve unit tests for container name autocompletion #124916
Conversation
3e2c77f
to
fe37f03
Compare
ping @ardaguclu @ah8ad3 since you already have context on this. |
/retest |
fe37f03
to
834398a
Compare
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.
Thanks for PR!
I haven't check to see if is there any other function that can be replaced with this test table too.
staging/src/k8s.io/kubectl/pkg/util/completion/completion_test.go
Outdated
Show resolved
Hide resolved
@ah8ad3 should I update all of them? |
My bad on not specifying my opinion, i think if there is for example 5 other tests that can be removed and put in the table here it would be better. |
There are many of them in the |
834398a
to
62e410a
Compare
/retest |
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 thanks!
/triage accepted |
ping @brianpursley @ardaguclu |
staging/src/k8s.io/kubectl/pkg/util/completion/completion_test.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/kubectl/pkg/util/completion/completion_test.go
Outdated
Show resolved
Hide resolved
62e410a
to
2d2eaed
Compare
@brianpursley thanks for the review! Updated and PTAL. |
2d2eaed
to
f2b9286
Compare
/retest |
I see the unit tests failed after moving the lines as I had suggested. I'm not sure why those lines need to be inside the loop, but there must be something that needs to be reset for each test (iostreams maybe?). I think you can put those lines back inside the loop like you had them and it should be fine. |
Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>
f2b9286
to
fe81d0d
Compare
@brianpursley Thanks and done. Also maybe it's one of the reasons that previous tests were separated. |
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.
Thanks!
/lgtm
LGTM label has been added. Git tree hash: 17e70aa1ae4a12d1fa00daf09f960c731cad0d31
|
That looks good to me and thank you. But next time it is better to work on the issues that are labelled with triage/accepted to prevent any waste of effort as request might be rejected by the maintainers. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu, TessaIO 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 |
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
1 similar comment
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
@TessaIO: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Cleanup and add some tests for unit tests for container name autocompletion.
Which issue(s) this PR fixes:
Fixes kubernetes/kubectl#1600
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: