Skip to content

Commit

Permalink
Use assert.ElementsMatch() to ignore ordering in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hjkatz committed Oct 24, 2024
1 parent 2002e6f commit 20c2ae1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/controller/bindings/endpointbinding_poller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ func Test_EndpointBindingPoller_filterEndpointBindingActions(t *testing.T) {

gotCreate, gotUpdate, gotDelete := examplePoller.filterEndpointBindingActions(context.TODO(), test.existing, test.desired)

assert.Equal(test.wantCreate, gotCreate)
assert.Equal(test.wantUpdate, gotUpdate)
assert.Equal(test.wantDelete, gotDelete)
assert.ElementsMatch(test.wantCreate, gotCreate)
assert.ElementsMatch(test.wantUpdate, gotUpdate)
assert.ElementsMatch(test.wantDelete, gotDelete)
})
}
}
Expand Down

0 comments on commit 20c2ae1

Please sign in to comment.