test(generators): add regression tests for deterministic ConfigMap key ordering#6092
test(generators): add regression tests for deterministic ConfigMap key ordering#6092lolo1883NIG wants to merge 2 commits intokubernetes-sigs:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lolo1883NIG The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @lolo1883NIG! |
|
Hi @lolo1883NIG. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
1db11f5 to
d375c24
Compare
…y ordering Adds explicit test cases to verify that ConfigMap data keys are always emitted in sorted (alphabetical) order regardless of the order they are defined in the source — covering literals, env files, and mixed sources.
d375c24 to
0ac8ab7
Compare
|
Hey @koba1t or @varshaprasad96 can you review and provide /ok-to-test? |
|
#6025 has not been closed yet.... |
|
@koba1t: The label(s) DetailsIn 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-sigs/prow repository. |
|
@lolo1883NIG |
|
This PR has multiple commits, and the default merge method is: merge. DetailsInstructions 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. |
|
/approve cancel |
What this does
Adds explicit regression tests verifying that
ConfigMapdata keys are always emitted in sorted (alphabetical) order regardless of the order they are defined in the source.Closes #4292
Background
Issue #4292 reported that
kustomize buildcould produce ConfigMap items in a non-deterministic order. A previous fix attempt (#6025) was closed because it lacked sufficient test coverage — the reviewer explicitly asked for tests before anything else would be reviewed.This PR addresses that feedback directly by adding three new test cases to
TestMakeConfigMap:zebra, mango, apple, banana, kiwimust output asapple, banana, kiwi, mango, zebraThe behavior under test is already implemented via
SortedMapKeysinkyaml/yaml/datamap.go. These tests lock it in against future regressions.Testing
All 8 test cases pass (3 new + 5 existing).
Note on pre-existing failures
TestAddManagedbyLabelinapi/krustyand a test inapi/provenancefail due to a version string mismatch (kustomize-(devel)vskustomize-(test)) that is pre-existing onmasterand unrelated to this change.