From 024880500e1e571978216504ddb31f0a21afdd53 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 --- 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)) }) } }