fix: fix non-determinism in skaffoldyamls_test.go
kokoro test failure is not related to this PR, is an instance of known flake
@@ -121,7 +121,10 @@ func TestGetSkaffoldYamlsLintResults(t *testing.T) {
testutil.Run(t, test.description, func(t *testutil.T) {
tmpdir := t.TempDir()
configSet := parser.SkaffoldConfigSet{}
- for module, skaffoldyamlText := range test.moduleAndSkaffoldYamls {
+ // iteration done to enforce result order
+ for i := 0; i < len(test.moduleAndSkaffoldYamls); i++ {
+ module := fmt.Sprintf("cfg%d", i)
+ skaffoldyamlText := test.moduleAndSkaffoldYamls[module]
fp := filepath.Join(tmpdir, fmt.Sprintf("%s.yaml", module))
err := ioutil.WriteFile(fp, []byte(skaffoldyamlText), 0644)
if err != nil {
