forked from TrueCloudLab/frostfs-node
[#496] node: Fix linter importas
Standardize the alias of the import frostfs-sdk-go/object as objectSDK. Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
4bbe9cc936
commit
033eaf77e1
80 changed files with 444 additions and 443 deletions
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/util"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -15,7 +15,7 @@ func TestMergeSplitInfo(t *testing.T) {
|
|||
uid, err := uuid.NewUUID()
|
||||
require.NoError(t, err)
|
||||
|
||||
splitID := object.NewSplitID()
|
||||
splitID := objectSDK.NewSplitID()
|
||||
splitID.SetUUID(uid)
|
||||
|
||||
var rawLinkID, rawLastID [32]byte
|
||||
|
@ -30,35 +30,35 @@ func TestMergeSplitInfo(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
lastID.SetSHA256(rawLastID)
|
||||
|
||||
target := object.NewSplitInfo() // target is SplitInfo struct with all fields set
|
||||
target := objectSDK.NewSplitInfo() // target is SplitInfo struct with all fields set
|
||||
target.SetSplitID(splitID)
|
||||
target.SetLastPart(lastID)
|
||||
target.SetLink(linkID)
|
||||
|
||||
t.Run("merge empty", func(t *testing.T) {
|
||||
to := object.NewSplitInfo()
|
||||
to := objectSDK.NewSplitInfo()
|
||||
|
||||
result := util.MergeSplitInfo(target, to)
|
||||
require.Equal(t, result, target)
|
||||
})
|
||||
|
||||
t.Run("merge link", func(t *testing.T) {
|
||||
from := object.NewSplitInfo()
|
||||
from := objectSDK.NewSplitInfo()
|
||||
from.SetSplitID(splitID)
|
||||
from.SetLastPart(lastID)
|
||||
|
||||
to := object.NewSplitInfo()
|
||||
to := objectSDK.NewSplitInfo()
|
||||
to.SetLink(linkID)
|
||||
|
||||
result := util.MergeSplitInfo(from, to)
|
||||
require.Equal(t, result, target)
|
||||
})
|
||||
t.Run("merge last", func(t *testing.T) {
|
||||
from := object.NewSplitInfo()
|
||||
from := objectSDK.NewSplitInfo()
|
||||
from.SetSplitID(splitID)
|
||||
from.SetLink(linkID)
|
||||
|
||||
to := object.NewSplitInfo()
|
||||
to := objectSDK.NewSplitInfo()
|
||||
to.SetLastPart(lastID)
|
||||
|
||||
result := util.MergeSplitInfo(from, to)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue