Reapply "[#972] Use require.ElementsMatch() where possible"
This reverts commit 7627d08914
.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
2ca5dfc2f6
commit
2c4b50a71e
3 changed files with 3 additions and 35 deletions
|
@ -3,7 +3,6 @@ package meta_test
|
|||
import (
|
||||
"context"
|
||||
"math/rand"
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/object"
|
||||
|
@ -108,18 +107,9 @@ func TestDB_ContainersCount(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
sort.Slice(expected, func(i, j int) bool {
|
||||
return expected[i].EncodeToString() < expected[j].EncodeToString()
|
||||
})
|
||||
|
||||
got, err := db.Containers(context.Background())
|
||||
require.NoError(t, err)
|
||||
|
||||
sort.Slice(got, func(i, j int) bool {
|
||||
return got[i].EncodeToString() < got[j].EncodeToString()
|
||||
})
|
||||
|
||||
require.Equal(t, expected, got)
|
||||
require.ElementsMatch(t, expected, got)
|
||||
}
|
||||
|
||||
func TestDB_ContainerSize(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue