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
azure: validation: machinepool: sort slice before comparing #7407
azure: validation: machinepool: sort slice before comparing #7407
Conversation
We cannot rely on any ordering from iterating over a Golang map. If we do, we might fail unit tests because the values we compare with are different: ``` --- FAIL: TestValidateMachinePool (0.00s) --- FAIL: TestValidateMachinePool/securityType_set_to_ConfidentialVM_but_securityEncryptionType_is_invalid (0.00s) machinepool_test.go:610: Error Trace: /go/src/github.com/openshift/installer/pkg/types/azure/validation/machinepool_test.go:610 Error: Expect "test-path.defaultMachinePlatform.osDisk.securityProfile.securityEncryptionType: Unsupported value: "invalidSecurityEncryptionType": supported values: "DiskWithVMGuestState", "VMGuestStateOnly"" to match "^test-path.defaultMachinePlatform.osDisk.securityProfile.securityEncryptionType: Unsupported value: "invalidSecurityEncryptionType": supported values: "VMGuestStateOnly", "DiskWithVMGuestState"$" Test: TestValidateMachinePool/securityType_set_to_ConfidentialVM_but_securityEncryptionType_is_invalid FAIL ``` Using a sorted list resolves the problem.
/test e2e-azure-ovn |
@r4f4: The following tests failed, say
Full PR test history. Your PR dashboard. 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. |
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
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhixson74, rna-afk 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 |
16f19ea
into
openshift:master
/test remaining-required |
We cannot rely on any ordering from iterating over a Golang map. If we do, we might fail unit tests because the values we compare with are different:
Using a sorted list resolves the problem.