mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
fix sort test (#552)
This commit is contained in:
parent
e995e5a7a1
commit
bc7fda6c72
@ -1,12 +1,12 @@
|
||||
package remote_test
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/ledgerwatch/erigon-lib/gointerfaces/remote"
|
||||
"github.com/ledgerwatch/erigon-lib/gointerfaces/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
func TestSort(t *testing.T) {
|
||||
@ -49,8 +49,7 @@ func TestSort(t *testing.T) {
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
||||
sort.Sort(tt.got)
|
||||
|
||||
slices.SortFunc(tt.got.NodesInfo, remote.NodeInfoReplyLess)
|
||||
assert.Equal(t, tt.want, tt.got)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user