Skip to content

Commit

Permalink
Compare only spec.destinations for route_mappings [unit test]
Browse files Browse the repository at this point in the history
When indexes are created for route_mappings, this unit test
fails for postgres 10 and 11 version, because it compare the whole hash
and the order of the spec.destinations array was swapped for these two
versions. Nevertheless, we are intreseted in the spec.destinations array
and this changes match that exactly.
  • Loading branch information
iaftab-alam authored and johha committed Apr 12, 2023
1 parent c455425 commit 728d50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/unit/lib/kubernetes/route_resource_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
]

expect(k8s_client).to receive(:update_route) do |actual|
expect(expected_hash.to_hash).to eq(actual.to_hash)
expect(expected_hash.spec.destinations).to match_array(actual.spec.destinations)
end

route_resource_manager.update_destinations(route)
Expand Down

0 comments on commit 728d50f

Please sign in to comment.