Skip to content

Commit

Permalink
Fix TestValidateRoutedOverrides
Browse files Browse the repository at this point in the history
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 <[email protected]>
(cherry picked from commit 0248805)
  • Loading branch information
stuggi committed Sep 4, 2024
1 parent 726023d commit 4013011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/common/service/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
}
}

0 comments on commit 4013011

Please sign in to comment.