From 6f41cd86eddce161145cbc8b9be1a94d516bc5b1 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 1 Dec 2021 16:56:48 +0300 Subject: [PATCH] [#979] Upgrade SDK NeoFS Go dependency Signed-off-by: Leonard Lyubich --- go.mod | 4 ++-- go.sum | 8 ++++---- pkg/core/object/fmt_test.go | 10 +++++----- .../processors/audit/scheduler_test.go | 2 +- pkg/innerring/processors/subnet/put_test.go | 2 +- .../blobovnicza/blobovnicza_test.go | 2 +- .../blobstor/blobovnicza_test.go | 2 +- .../blobstor/fstree/fstree_test.go | 2 +- .../engine/control_test.go | 2 +- pkg/local_object_storage/engine/engine_test.go | 2 +- pkg/local_object_storage/engine/head_test.go | 2 +- pkg/local_object_storage/engine/inhume_test.go | 2 +- pkg/local_object_storage/engine/list_test.go | 2 +- .../metabase/containers_test.go | 2 +- pkg/local_object_storage/metabase/db_test.go | 6 +++--- .../metabase/delete_test.go | 4 ++-- .../metabase/exists_test.go | 4 ++-- pkg/local_object_storage/metabase/get_test.go | 2 +- pkg/local_object_storage/metabase/list_test.go | 2 +- .../metabase/select_test.go | 18 +++++++++--------- pkg/local_object_storage/shard/delete_test.go | 2 +- pkg/local_object_storage/shard/get_test.go | 2 +- pkg/local_object_storage/shard/head_test.go | 2 +- pkg/local_object_storage/shard/inhume_test.go | 2 +- pkg/local_object_storage/shard/list_test.go | 2 +- pkg/local_object_storage/shard/shard_test.go | 4 ++-- pkg/morph/client/audit/wrapper/result_test.go | 2 +- .../announcement/load/controller/calls_test.go | 2 +- .../announcement/load/storage/storage_test.go | 2 +- pkg/services/object/acl/acl_test.go | 6 +++--- pkg/services/object/acl/eacl/v2/eacl_test.go | 2 +- pkg/services/object/get/get_test.go | 2 +- pkg/services/object/search/search_test.go | 4 ++-- 33 files changed, 57 insertions(+), 57 deletions(-) diff --git a/go.mod b/go.mod index 9f262722e..68269c1d5 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,8 @@ require ( github.com/multiformats/go-multiaddr v0.4.0 github.com/nspcc-dev/hrw v1.0.9 github.com/nspcc-dev/neo-go v0.97.4-pre.0.20211126130906-87f5113c031b - github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211124141318-d93828f46514 - github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211126125208-279a5a1e0bfe + github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1 + github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211201135501-471ed5a3ec0b github.com/nspcc-dev/tzhash v1.4.0 github.com/panjf2000/ants/v2 v2.4.0 github.com/paulmach/orb v0.2.2 diff --git a/go.sum b/go.sum index d3e97d650..23f83a91b 100644 --- a/go.sum +++ b/go.sum @@ -363,15 +363,15 @@ github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1: github.com/nspcc-dev/neo-go v0.97.4-pre.0.20211126130906-87f5113c031b h1:YEtImvVCnf7sTXJGd84e9SxzLG3LU6czJN/Q35XQGDY= github.com/nspcc-dev/neo-go v0.97.4-pre.0.20211126130906-87f5113c031b/go.mod h1:ThDwtZ1KXjpz2n0UyKkS0sEth5weNqMkZ2cWSIKaxaE= github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211118144033-580f6c5554ff/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= -github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211124141318-d93828f46514 h1:ccZ+d8nJa8H2IWCLlr6YSanqwtTP6YiWa8RmCtT8aOs= -github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211124141318-d93828f46514/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= +github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1 h1:CGA56mhLLduWRuMHcWujP5Ek+gAnXHk0WuIWkG65G1s= +github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= github.com/nspcc-dev/neofs-crypto v0.2.0/go.mod h1:F/96fUzPM3wR+UGsPi3faVNmFlA9KAEAUQR7dMxZmNA= github.com/nspcc-dev/neofs-crypto v0.2.3/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw= github.com/nspcc-dev/neofs-crypto v0.3.0 h1:zlr3pgoxuzrmGCxc5W8dGVfA9Rro8diFvVnBg0L4ifM= github.com/nspcc-dev/neofs-crypto v0.3.0/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw= github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211123100340-d9317cbea191/go.mod h1:zpeoUpflmlq9aDOTC72+E2JyJZDNzoqbZJFtqClBuu4= -github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211126125208-279a5a1e0bfe h1:/c6mALl+YZh6A/5IZ+yTgkAroHGgId1bgvTAdrTtiKg= -github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211126125208-279a5a1e0bfe/go.mod h1:kyRFPFVQ7z5oeqNxawVk05E4w+fkbkWbgBIRH/wlvRQ= +github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211201135501-471ed5a3ec0b h1:avqxNzqFiUOViVXgCQ1MphAZNUAX4teCwk7k4xFQzXk= +github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211201135501-471ed5a3ec0b/go.mod h1:BIvL92OEoz9wr5LMYXKOCo10S1qpU2ZaqGZlu7V71hI= github.com/nspcc-dev/rfc6979 v0.1.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso= github.com/nspcc-dev/rfc6979 v0.2.0 h1:3e1WNxrN60/6N0DW7+UYisLeZJyfqZTNOjeV/toYvOE= github.com/nspcc-dev/rfc6979 v0.2.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso= diff --git a/pkg/core/object/fmt_test.go b/pkg/core/object/fmt_test.go index c6e853c73..358f15137 100644 --- a/pkg/core/object/fmt_test.go +++ b/pkg/core/object/fmt_test.go @@ -42,7 +42,7 @@ func blankValidObject(t *testing.T, key *ecdsa.PrivateKey) *RawObject { ownerID.SetNeo3Wallet(wallet) obj := NewRaw() - obj.SetContainerID(cidtest.GenerateID()) + obj.SetContainerID(cidtest.ID()) obj.SetOwnerID(ownerID) return obj @@ -87,7 +87,7 @@ func TestFormatValidator_Validate(t *testing.T) { t.Run("unsigned object", func(t *testing.T) { obj := NewRaw() - obj.SetContainerID(cidtest.GenerateID()) + obj.SetContainerID(cidtest.ID()) obj.SetID(testObjectID(t)) require.Error(t, v.Validate(obj.Object())) @@ -97,12 +97,12 @@ func TestFormatValidator_Validate(t *testing.T) { w, err := owner.NEO3WalletFromPublicKey((*ecdsa.PublicKey)(ownerKey.PublicKey())) require.NoError(t, err) - tok := sessiontest.Generate() + tok := sessiontest.Token() tok.SetOwnerID(owner.NewIDFromNeo3Wallet(w)) obj := NewRaw() - obj.SetContainerID(cidtest.GenerateID()) - obj.SetSessionToken(sessiontest.Generate()) + obj.SetContainerID(cidtest.ID()) + obj.SetSessionToken(sessiontest.Token()) obj.SetOwnerID(tok.OwnerID()) require.NoError(t, object.SetIDWithSignature(&ownerKey.PrivateKey, obj.SDK())) diff --git a/pkg/innerring/processors/audit/scheduler_test.go b/pkg/innerring/processors/audit/scheduler_test.go index 7dcb010d7..2865112bd 100644 --- a/pkg/innerring/processors/audit/scheduler_test.go +++ b/pkg/innerring/processors/audit/scheduler_test.go @@ -79,7 +79,7 @@ func generateContainers(n int) []*cid.ID { result := make([]*cid.ID, 0, n) for i := 0; i < n; i++ { - result = append(result, cidtest.GenerateID()) + result = append(result, cidtest.ID()) } return result diff --git a/pkg/innerring/processors/subnet/put_test.go b/pkg/innerring/processors/subnet/put_test.go index 50c5f31b1..2dbc6e66c 100644 --- a/pkg/innerring/processors/subnet/put_test.go +++ b/pkg/innerring/processors/subnet/put_test.go @@ -101,7 +101,7 @@ func TestPutValidator_Assert(t *testing.T) { // diff explicit creator and the one in info var creator2 owner.ID - creator2 = *ownertest.GenerateID() + creator2 = *ownertest.ID() e.info.SetOwner(creator2) diff --git a/pkg/local_object_storage/blobovnicza/blobovnicza_test.go b/pkg/local_object_storage/blobovnicza/blobovnicza_test.go index 3eaca6af9..ced698dab 100644 --- a/pkg/local_object_storage/blobovnicza/blobovnicza_test.go +++ b/pkg/local_object_storage/blobovnicza/blobovnicza_test.go @@ -28,7 +28,7 @@ func testAddress() *objectSDK.Address { addr := objectSDK.NewAddress() addr.SetObjectID(oid) - addr.SetContainerID(cidtest.GenerateID()) + addr.SetContainerID(cidtest.ID()) return addr } diff --git a/pkg/local_object_storage/blobstor/blobovnicza_test.go b/pkg/local_object_storage/blobstor/blobovnicza_test.go index f341c8084..0b2d9af73 100644 --- a/pkg/local_object_storage/blobstor/blobovnicza_test.go +++ b/pkg/local_object_storage/blobstor/blobovnicza_test.go @@ -26,7 +26,7 @@ func testAddress() *objectSDK.Address { addr := objectSDK.NewAddress() addr.SetObjectID(oid) - addr.SetContainerID(cidtest.GenerateID()) + addr.SetContainerID(cidtest.ID()) return addr } diff --git a/pkg/local_object_storage/blobstor/fstree/fstree_test.go b/pkg/local_object_storage/blobstor/fstree/fstree_test.go index 6f08c2866..208c2dcf1 100644 --- a/pkg/local_object_storage/blobstor/fstree/fstree_test.go +++ b/pkg/local_object_storage/blobstor/fstree/fstree_test.go @@ -26,7 +26,7 @@ func testOID() *objectSDK.ID { func testAddress() *objectSDK.Address { a := objectSDK.NewAddress() a.SetObjectID(testOID()) - a.SetContainerID(cidtest.GenerateID()) + a.SetContainerID(cidtest.ID()) return a } diff --git a/pkg/local_object_storage/engine/control_test.go b/pkg/local_object_storage/engine/control_test.go index dab560a8f..32ed34125 100644 --- a/pkg/local_object_storage/engine/control_test.go +++ b/pkg/local_object_storage/engine/control_test.go @@ -17,7 +17,7 @@ func TestExecBlocks(t *testing.T) { }) // put some object - obj := generateRawObjectWithCID(t, cidtest.GenerateID()).Object() + obj := generateRawObjectWithCID(t, cidtest.ID()).Object() addr := obj.Address() diff --git a/pkg/local_object_storage/engine/engine_test.go b/pkg/local_object_storage/engine/engine_test.go index dacdf702f..e94b4d28e 100644 --- a/pkg/local_object_storage/engine/engine_test.go +++ b/pkg/local_object_storage/engine/engine_test.go @@ -99,7 +99,7 @@ func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { obj := object.NewRaw() obj.SetID(testOID()) - obj.SetOwnerID(ownertest.GenerateID()) + obj.SetOwnerID(ownertest.ID()) obj.SetContainerID(cid) obj.SetVersion(version) obj.SetPayloadChecksum(csum) diff --git a/pkg/local_object_storage/engine/head_test.go b/pkg/local_object_storage/engine/head_test.go index 3dec07266..dc673ee18 100644 --- a/pkg/local_object_storage/engine/head_test.go +++ b/pkg/local_object_storage/engine/head_test.go @@ -13,7 +13,7 @@ import ( func TestHeadRaw(t *testing.T) { defer os.RemoveAll(t.Name()) - cid := cidtest.GenerateID() + cid := cidtest.ID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/engine/inhume_test.go b/pkg/local_object_storage/engine/inhume_test.go index dcb445248..614f7a682 100644 --- a/pkg/local_object_storage/engine/inhume_test.go +++ b/pkg/local_object_storage/engine/inhume_test.go @@ -13,7 +13,7 @@ import ( func TestStorageEngine_Inhume(t *testing.T) { defer os.RemoveAll(t.Name()) - cid := cidtest.GenerateID() + cid := cidtest.ID() splitID := objectSDK.NewSplitID() fs := objectSDK.SearchFilters{} diff --git a/pkg/local_object_storage/engine/list_test.go b/pkg/local_object_storage/engine/list_test.go index 84edb3044..80b21fc1f 100644 --- a/pkg/local_object_storage/engine/list_test.go +++ b/pkg/local_object_storage/engine/list_test.go @@ -27,7 +27,7 @@ func TestListWithCursor(t *testing.T) { got := make([]*object.Address, 0, total) for i := 0; i < total; i++ { - containerID := cidtest.GenerateID() + containerID := cidtest.ID() obj := generateRawObjectWithCID(t, containerID) prm := new(PutPrm).WithObject(obj.Object()) _, err := e.Put(prm) diff --git a/pkg/local_object_storage/metabase/containers_test.go b/pkg/local_object_storage/metabase/containers_test.go index 2823e4b35..65e42cd50 100644 --- a/pkg/local_object_storage/metabase/containers_test.go +++ b/pkg/local_object_storage/metabase/containers_test.go @@ -127,7 +127,7 @@ func TestDB_ContainerSize(t *testing.T) { objs := make(map[*cid.ID][]*object.RawObject, C*N) for i := 0; i < C; i++ { - cid := cidtest.GenerateID() + cid := cidtest.ID() cids[cid] = 0 for j := 0; j < N; j++ { diff --git a/pkg/local_object_storage/metabase/db_test.go b/pkg/local_object_storage/metabase/db_test.go index c3b7e131b..44ed892e7 100644 --- a/pkg/local_object_storage/metabase/db_test.go +++ b/pkg/local_object_storage/metabase/db_test.go @@ -61,7 +61,7 @@ func newDB(t testing.TB) *meta.DB { } func generateRawObject(t *testing.T) *object.RawObject { - return generateRawObjectWithCID(t, cidtest.GenerateID()) + return generateRawObjectWithCID(t, cidtest.ID()) } func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { @@ -80,7 +80,7 @@ func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { obj := object.NewRaw() obj.SetID(testOID()) - obj.SetOwnerID(ownertest.GenerateID()) + obj.SetOwnerID(ownertest.ID()) obj.SetContainerID(cid) obj.SetVersion(version) obj.SetPayloadChecksum(csum) @@ -92,7 +92,7 @@ func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { func generateAddress() *objectSDK.Address { addr := objectSDK.NewAddress() - addr.SetContainerID(cidtest.GenerateID()) + addr.SetContainerID(cidtest.ID()) addr.SetObjectID(testOID()) return addr diff --git a/pkg/local_object_storage/metabase/delete_test.go b/pkg/local_object_storage/metabase/delete_test.go index 2b43b95c9..c22e766cb 100644 --- a/pkg/local_object_storage/metabase/delete_test.go +++ b/pkg/local_object_storage/metabase/delete_test.go @@ -13,7 +13,7 @@ import ( func TestDB_Delete(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() parent := generateRawObjectWithCID(t, cid) addAttribute(parent, "foo", "bar") @@ -69,7 +69,7 @@ func TestDB_Delete(t *testing.T) { func TestDeleteAllChildren(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() // generate parent object parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/metabase/exists_test.go b/pkg/local_object_storage/metabase/exists_test.go index 589ce1199..8706d4630 100644 --- a/pkg/local_object_storage/metabase/exists_test.go +++ b/pkg/local_object_storage/metabase/exists_test.go @@ -55,7 +55,7 @@ func TestDB_Exists(t *testing.T) { }) t.Run("virtual object", func(t *testing.T) { - cid := cidtest.GenerateID() + cid := cidtest.ID() parent := generateRawObjectWithCID(t, cid) child := generateRawObjectWithCID(t, cid) @@ -72,7 +72,7 @@ func TestDB_Exists(t *testing.T) { }) t.Run("merge split info", func(t *testing.T) { - cid := cidtest.GenerateID() + cid := cidtest.ID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/metabase/get_test.go b/pkg/local_object_storage/metabase/get_test.go index c1c7c4d4b..eeeab2c77 100644 --- a/pkg/local_object_storage/metabase/get_test.go +++ b/pkg/local_object_storage/metabase/get_test.go @@ -59,7 +59,7 @@ func TestDB_Get(t *testing.T) { }) t.Run("put virtual object", func(t *testing.T) { - cid := cidtest.GenerateID() + cid := cidtest.ID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/metabase/list_test.go b/pkg/local_object_storage/metabase/list_test.go index 17475278c..d25160059 100644 --- a/pkg/local_object_storage/metabase/list_test.go +++ b/pkg/local_object_storage/metabase/list_test.go @@ -23,7 +23,7 @@ func TestLisObjectsWithCursor(t *testing.T) { // fill metabase with objects for i := 0; i < containers; i++ { - containerID := cidtest.GenerateID() + containerID := cidtest.ID() // add one regular object obj := generateRawObjectWithCID(t, containerID) diff --git a/pkg/local_object_storage/metabase/select_test.go b/pkg/local_object_storage/metabase/select_test.go index 7b4200776..864fd4ab7 100644 --- a/pkg/local_object_storage/metabase/select_test.go +++ b/pkg/local_object_storage/metabase/select_test.go @@ -15,7 +15,7 @@ import ( func TestDB_SelectUserAttributes(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() raw1 := generateRawObjectWithCID(t, cid) addAttribute(raw1, "foo", "bar") @@ -137,7 +137,7 @@ func TestDB_SelectUserAttributes(t *testing.T) { func TestDB_SelectRootPhyParent(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() // prepare @@ -304,7 +304,7 @@ func TestDB_SelectRootPhyParent(t *testing.T) { func TestDB_SelectInhume(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() raw1 := generateRawObjectWithCID(t, cid) err := putBig(db, raw1.Object()) @@ -336,7 +336,7 @@ func TestDB_SelectInhume(t *testing.T) { func TestDB_SelectPayloadHash(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() raw1 := generateRawObjectWithCID(t, cid) err := putBig(db, raw1.Object()) @@ -371,7 +371,7 @@ func TestDB_SelectPayloadHash(t *testing.T) { func TestDB_SelectWithSlowFilters(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() v20 := new(version.Version) v20.SetMajor(2) @@ -469,7 +469,7 @@ func TestDB_SelectWithSlowFilters(t *testing.T) { func TestDB_SelectObjectID(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() // prepare @@ -577,7 +577,7 @@ func TestDB_SelectObjectID(t *testing.T) { func TestDB_SelectSplitID(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() child1 := generateRawObjectWithCID(t, cid) child2 := generateRawObjectWithCID(t, cid) @@ -631,7 +631,7 @@ func TestDB_SelectSplitID(t *testing.T) { func TestDB_SelectContainerID(t *testing.T) { db := newDB(t) - cid := cidtest.GenerateID() + cid := cidtest.ID() obj1 := generateRawObjectWithCID(t, cid) err := putBig(db, obj1.Object()) @@ -665,7 +665,7 @@ func TestDB_SelectContainerID(t *testing.T) { }) t.Run("not same cid", func(t *testing.T) { - newCID := cidtest.GenerateID() + newCID := cidtest.ID() fs := objectSDK.SearchFilters{} fs.AddObjectContainerIDFilter(objectSDK.MatchStringEqual, newCID) diff --git a/pkg/local_object_storage/shard/delete_test.go b/pkg/local_object_storage/shard/delete_test.go index e3306ed57..67b7d025a 100644 --- a/pkg/local_object_storage/shard/delete_test.go +++ b/pkg/local_object_storage/shard/delete_test.go @@ -23,7 +23,7 @@ func testShardDelete(t *testing.T, hasWriteCache bool) { sh := newShard(t, hasWriteCache) defer releaseShard(sh, t) - cid := cidtest.GenerateID() + cid := cidtest.ID() obj := generateRawObjectWithCID(t, cid) addAttribute(obj, "foo", "bar") diff --git a/pkg/local_object_storage/shard/get_test.go b/pkg/local_object_storage/shard/get_test.go index d92dfce92..d0f9de9cf 100644 --- a/pkg/local_object_storage/shard/get_test.go +++ b/pkg/local_object_storage/shard/get_test.go @@ -68,7 +68,7 @@ func testShardGet(t *testing.T, hasWriteCache bool) { t.Run("parent object", func(t *testing.T) { obj := generateRawObject(t) addAttribute(obj, "foo", "bar") - cid := cidtest.GenerateID() + cid := cidtest.ID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/shard/head_test.go b/pkg/local_object_storage/shard/head_test.go index 36dff11db..ead199d1c 100644 --- a/pkg/local_object_storage/shard/head_test.go +++ b/pkg/local_object_storage/shard/head_test.go @@ -46,7 +46,7 @@ func testShardHead(t *testing.T, hasWriteCache bool) { }) t.Run("virtual object", func(t *testing.T) { - cid := cidtest.GenerateID() + cid := cidtest.ID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/shard/inhume_test.go b/pkg/local_object_storage/shard/inhume_test.go index 613678256..b467ab4c9 100644 --- a/pkg/local_object_storage/shard/inhume_test.go +++ b/pkg/local_object_storage/shard/inhume_test.go @@ -23,7 +23,7 @@ func testShardInhume(t *testing.T, hasWriteCache bool) { sh := newShard(t, hasWriteCache) defer releaseShard(sh, t) - cid := cidtest.GenerateID() + cid := cidtest.ID() obj := generateRawObjectWithCID(t, cid) addAttribute(obj, "foo", "bar") diff --git a/pkg/local_object_storage/shard/list_test.go b/pkg/local_object_storage/shard/list_test.go index 49c889543..3ea6a0c8b 100644 --- a/pkg/local_object_storage/shard/list_test.go +++ b/pkg/local_object_storage/shard/list_test.go @@ -34,7 +34,7 @@ func testShardList(t *testing.T, sh *shard.Shard) { putPrm := new(shard.PutPrm) for i := 0; i < C; i++ { - cid := cidtest.GenerateID() + cid := cidtest.ID() for j := 0; j < N; j++ { obj := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/shard/shard_test.go b/pkg/local_object_storage/shard/shard_test.go index 30807b2b2..f89552600 100644 --- a/pkg/local_object_storage/shard/shard_test.go +++ b/pkg/local_object_storage/shard/shard_test.go @@ -65,7 +65,7 @@ func releaseShard(s *shard.Shard, t testing.TB) { } func generateRawObject(t *testing.T) *object.RawObject { - return generateRawObjectWithCID(t, cidtest.GenerateID()) + return generateRawObjectWithCID(t, cidtest.ID()) } func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { @@ -84,7 +84,7 @@ func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { obj := object.NewRaw() obj.SetID(generateOID()) - obj.SetOwnerID(ownertest.GenerateID()) + obj.SetOwnerID(ownertest.ID()) obj.SetContainerID(cid) obj.SetVersion(version) obj.SetPayloadChecksum(csum) diff --git a/pkg/morph/client/audit/wrapper/result_test.go b/pkg/morph/client/audit/wrapper/result_test.go index be8d47116..6f749c395 100644 --- a/pkg/morph/client/audit/wrapper/result_test.go +++ b/pkg/morph/client/audit/wrapper/result_test.go @@ -33,7 +33,7 @@ func TestAuditResults(t *testing.T) { auditClientWrapper, err := auditWrapper.NewFromMorph(morphClient, auditHash, 0) require.NoError(t, err) - id := cidtest.GenerateID() + id := cidtest.ID() auditRes := auditAPI.NewResult() auditRes.SetAuditEpoch(epoch) diff --git a/pkg/services/container/announcement/load/controller/calls_test.go b/pkg/services/container/announcement/load/controller/calls_test.go index 1899d6321..199ca57ce 100644 --- a/pkg/services/container/announcement/load/controller/calls_test.go +++ b/pkg/services/container/announcement/load/controller/calls_test.go @@ -75,7 +75,7 @@ func (s *testAnnouncementStorage) Close() error { func randAnnouncement() container.UsedSpaceAnnouncement { a := container.NewAnnouncement() - a.SetContainerID(cidtest.GenerateID()) + a.SetContainerID(cidtest.ID()) a.SetUsedSpace(rand.Uint64()) return *a diff --git a/pkg/services/container/announcement/load/storage/storage_test.go b/pkg/services/container/announcement/load/storage/storage_test.go index b5d4689f6..7a76e3c56 100644 --- a/pkg/services/container/announcement/load/storage/storage_test.go +++ b/pkg/services/container/announcement/load/storage/storage_test.go @@ -13,7 +13,7 @@ func TestStorage(t *testing.T) { const epoch uint64 = 13 a := container.NewAnnouncement() - a.SetContainerID(cidtest.GenerateID()) + a.SetContainerID(cidtest.ID()) a.SetEpoch(epoch) const opinionsNum = 100 diff --git a/pkg/services/object/acl/acl_test.go b/pkg/services/object/acl/acl_test.go index c41e12f74..a0dad6969 100644 --- a/pkg/services/object/acl/acl_test.go +++ b/pkg/services/object/acl/acl_test.go @@ -46,10 +46,10 @@ func TestStickyCheck(t *testing.T) { info.requestRole = eacl.RoleSystem info.basicACL.SetSticky() - require.True(t, stickyBitCheck(info, ownertest.GenerateID())) + require.True(t, stickyBitCheck(info, ownertest.ID())) info.basicACL.ResetSticky() - require.True(t, stickyBitCheck(info, ownertest.GenerateID())) + require.True(t, stickyBitCheck(info, ownertest.ID())) }) t.Run("owner ID and/or public key emptiness", func(t *testing.T) { @@ -73,7 +73,7 @@ func TestStickyCheck(t *testing.T) { var ownerID *owner.ID if withOwner { - ownerID = ownertest.GenerateID() + ownerID = ownertest.ID() } require.Equal(t, expected, stickyBitCheck(info, ownerID)) diff --git a/pkg/services/object/acl/eacl/v2/eacl_test.go b/pkg/services/object/acl/eacl/v2/eacl_test.go index 934587a83..faf244e36 100644 --- a/pkg/services/object/acl/eacl/v2/eacl_test.go +++ b/pkg/services/object/acl/eacl/v2/eacl_test.go @@ -61,7 +61,7 @@ func testID(t *testing.T) *objectSDK.ID { func testAddress(t *testing.T) *objectSDK.Address { addr := objectSDK.NewAddress() addr.SetObjectID(testID(t)) - addr.SetContainerID(cidtest.GenerateID()) + addr.SetContainerID(cidtest.ID()) return addr } diff --git a/pkg/services/object/get/get_test.go b/pkg/services/object/get/get_test.go index 56f27e52c..5781488f4 100644 --- a/pkg/services/object/get/get_test.go +++ b/pkg/services/object/get/get_test.go @@ -189,7 +189,7 @@ func generateAddress() *objectSDK.Address { addr := objectSDK.NewAddress() addr.SetObjectID(generateID()) - addr.SetContainerID(cidtest.GenerateID()) + addr.SetContainerID(cidtest.ID()) return addr } diff --git a/pkg/services/object/search/search_test.go b/pkg/services/object/search/search_test.go index b1e4517ca..5e85caac1 100644 --- a/pkg/services/object/search/search_test.go +++ b/pkg/services/object/search/search_test.go @@ -159,7 +159,7 @@ func TestGetLocalOnly(t *testing.T) { storage := newTestStorage() svc := newSvc(storage) - cid := cidtest.GenerateID() + cid := cidtest.ID() ids := generateIDs(10) storage.addResult(cid, ids, nil) @@ -175,7 +175,7 @@ func TestGetLocalOnly(t *testing.T) { storage := newTestStorage() svc := newSvc(storage) - cid := cidtest.GenerateID() + cid := cidtest.ID() testErr := errors.New("any error") storage.addResult(cid, nil, testErr)