-
Notifications
You must be signed in to change notification settings - Fork 244
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
Fix flaky kubeexec
unit test case with env vars
#5845
Fix flaky kubeexec
unit test case with env vars
#5845
Conversation
Using a map for storing such data does not guarantee an iteration order. As we are matching an exact command-line string in the test, we need to use a type that guarantees the iteration order.
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feloy 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 |
Thanks @rm3l for the quick fix |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/lgtm |
/override ci/prow/v4.10-integration-e2e |
@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.10-integration-e2e In response to this:
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. |
…eloper#5845) Using a map for storing such data does not guarantee an iteration order. As we are matching an exact command-line string in the test, we need to use a type that guarantees the iteration order.
What type of PR is this:
/kind tests
/area testing
What does this PR do / why we need it:
Unit tests in
pkg/remotecmd/kubeexec_test.go
expect an exact command-line string to be passed when running commands in containers. The problem is that the environment variables are stored in a map, the iteration order of which is not guaranteed.Initially reported in #5823 (comment)
Which issue(s) this PR fixes:
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
All tests in
kubeexec_test.go
should pass.cc @feloy