From 392ff9391657840d00c825030d68bef6c5181cc7 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sun, 23 Feb 2025 16:51:33 -0300 Subject: [PATCH] Fix flaky TestDedupeRepos (#30576) Signed-off-by: Felipe Santos --- pkg/downloader/manager_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go index 481a9e038..8731fb003 100644 --- a/pkg/downloader/manager_test.go +++ b/pkg/downloader/manager_test.go @@ -22,6 +22,8 @@ import ( "reflect" "testing" + "github.com/stretchr/testify/assert" + "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" chartutil "helm.sh/helm/v4/pkg/chart/util" @@ -657,9 +659,8 @@ func TestDedupeRepos(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := dedupeRepos(tt.repos); !reflect.DeepEqual(got, tt.want) { - t.Errorf("received:\n%v\nwant:\n%v", got, tt.want) - } + got := dedupeRepos(tt.repos) + assert.ElementsMatch(t, tt.want, got) }) } }