From 4013011e7a8be3fc9128d21110efc6d4e28c5bed Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Thu, 8 Aug 2024 07:52:26 +0200 Subject: [PATCH] Fix TestValidateRoutedOverrides ValidateRoutedOverrides does not guarantee a specific order of the returned ErrorList. As a result the "Multiple wrong override endpoints" sometimes fails even the expected errors are in the list. This changes to use ContainElements as it does not matter which order the errors are in the returned ErrorlList from ValidateRoutedOverrides. Signed-off-by: Martin Schuppert (cherry picked from commit 024880500e1e571978216504ddb31f0a21afdd53) --- modules/common/service/types_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/common/service/types_test.go b/modules/common/service/types_test.go index b53fd115..f15478be 100644 --- a/modules/common/service/types_test.go +++ b/modules/common/service/types_test.go @@ -134,7 +134,7 @@ func TestValidateRoutedOverrides(t *testing.T) { t.Run(tt.name, func(t *testing.T) { g := NewWithT(t) - g.Expect(ValidateRoutedOverrides(tt.basePath, tt.overrides)).To(Equal(tt.want)) + g.Expect(ValidateRoutedOverrides(tt.basePath, tt.overrides)).To(ContainElements(tt.want)) }) } }