From b92c4a9a5845ba32f2c30d752b1d008a8bc0b675 Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Wed, 15 Nov 2023 11:28:46 -0500 Subject: [PATCH] fix pull secret check in pull tests (#4134) --- pkg/tests/pull/pull_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/tests/pull/pull_test.go b/pkg/tests/pull/pull_test.go index 8082d9a239..f83e70c980 100644 --- a/pkg/tests/pull/pull_test.go +++ b/pkg/tests/pull/pull_test.go @@ -174,6 +174,14 @@ func TestKotsPull(t *testing.T) { require.NoError(t, err, wantPath) } + if strings.HasSuffix(wantPath, "pullsecrets.yaml") { + // pull secret patches are not generated in a deterministic order + gotPullSecrets := strings.Split(contentsString, "---\n") + wantPullSecrets := strings.Split(wantContentsString, "---\n") + require.ElementsMatch(t, wantPullSecrets, gotPullSecrets) + return nil + } + assert.Equal(t, wantContentsString, contentsString, wantPath) return nil })