Skip to content

Commit a259a75

Browse files
committed
fixup! DRA scheduler: adapt to v1alpha3 API
Relax checking of results: the order does not matter. This also avoids onsi/gomega#771
1 parent f8a5b86 commit a259a75

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

staging/src/k8s.io/dynamic-resource-allocation/structured/allocator_test.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -921,12 +921,7 @@ func TestAllocator(t *testing.T) {
921921
matchError = gomega.Not(gomega.HaveOccurred())
922922
}
923923
g.Expect(err).To(matchError)
924-
matchResults := gomega.HaveExactElements(tc.expectResults...)
925-
if len(tc.expectResults) == 0 {
926-
// Workaround for https://github.com/onsi/gomega/issues/771.
927-
matchResults = gomega.BeEmpty()
928-
}
929-
g.Expect(results).To(matchResults)
924+
g.Expect(results).To(gomega.ConsistOf(tc.expectResults...))
930925

931926
// Objects that the allocator had access to should not have been modified.
932927
g.Expect(toAllocate.claims).To(gomega.HaveExactElements(tc.claimsToAllocate))

0 commit comments

Comments
 (0)