Skip to content

Commit

Permalink
fixup! DRA scheduler: adapt to v1alpha3 API
Browse files Browse the repository at this point in the history
Relax checking of results: the order does not matter.
This also avoids onsi/gomega#771
  • Loading branch information
pohly committed Jul 19, 2024
1 parent f8a5b86 commit a259a75
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -921,12 +921,7 @@ func TestAllocator(t *testing.T) {
matchError = gomega.Not(gomega.HaveOccurred())
}
g.Expect(err).To(matchError)
matchResults := gomega.HaveExactElements(tc.expectResults...)
if len(tc.expectResults) == 0 {
// Workaround for https://github.com/onsi/gomega/issues/771.
matchResults = gomega.BeEmpty()
}
g.Expect(results).To(matchResults)
g.Expect(results).To(gomega.ConsistOf(tc.expectResults...))

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

0 comments on commit a259a75

Please sign in to comment.