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
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue