Skip to content

Commit

Permalink
fix flakey test of slice
Browse files Browse the repository at this point in the history
  • Loading branch information
MStreet3 committed Feb 20, 2025
1 parent 29f5cde commit 0320343
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deployment/address_book_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,12 @@ func Test_toTypeAndVersionMap(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := toTypeAndVersionMap(tt.addrs)
assert.Equal(t, tt.want, got)
require.Equal(t, len(tt.want), len(got))
for k, gotAddresses := range got {
wantAddresses, ok := tt.want[k]
require.True(t, ok)
require.ElementsMatch(t, wantAddresses, gotAddresses)
}
})
}
}

0 comments on commit 0320343

Please sign in to comment.