[#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:
Alexander Chuprov 2023-07-06 15:36:41 +03:00
parent 4bbe9cc936
commit 033eaf77e1
80 changed files with 444 additions and 443 deletions

View file

@ -9,7 +9,7 @@ import (
object2 "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/object"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/testutil"
meta "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/metabase"
"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"
oidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id/test"
"github.com/stretchr/testify/require"
@ -20,19 +20,19 @@ func TestDB_IterateExpired(t *testing.T) {
const epoch = 13
mAlive := map[object.Type]oid.Address{}
mExpired := map[object.Type]oid.Address{}
mAlive := map[objectSDK.Type]oid.Address{}
mExpired := map[objectSDK.Type]oid.Address{}
for _, typ := range []object.Type{
object.TypeRegular,
object.TypeTombstone,
object.TypeLock,
for _, typ := range []objectSDK.Type{
objectSDK.TypeRegular,
objectSDK.TypeTombstone,
objectSDK.TypeLock,
} {
mAlive[typ] = putWithExpiration(t, db, typ, epoch)
mExpired[typ] = putWithExpiration(t, db, typ, epoch-1)
}
expiredLocked := putWithExpiration(t, db, object.TypeRegular, epoch-1)
expiredLocked := putWithExpiration(t, db, objectSDK.TypeRegular, epoch-1)
require.NoError(t, db.Lock(context.Background(), expiredLocked.Container(), oidtest.ID(), []oid.ID{expiredLocked.Object()}))
@ -56,7 +56,7 @@ func TestDB_IterateExpired(t *testing.T) {
require.Empty(t, mExpired)
}
func putWithExpiration(t *testing.T, db *meta.DB, typ object.Type, expiresAt uint64) oid.Address {
func putWithExpiration(t *testing.T, db *meta.DB, typ objectSDK.Type, expiresAt uint64) oid.Address {
obj := testutil.GenerateObject()
obj.SetType(typ)
testutil.AddAttribute(obj, objectV2.SysAttributeExpEpoch, strconv.FormatUint(expiresAt, 10))