fix sort test (#552)

This commit is contained in:
Alex Sharov 2022-07-26 10:14:58 +07:00 committed by GitHub
parent e995e5a7a1
commit bc7fda6c72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
})
}