[#128] *: Use correct aliases for object testing
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
41f17d1a09
commit
6d3d91f889
8 changed files with 25 additions and 25 deletions
|
@ -8,7 +8,7 @@ import (
|
|||
audittest "github.com/nspcc-dev/neofs-sdk-go/audit/test"
|
||||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/version"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@ -40,11 +40,11 @@ func TestResult(t *testing.T) {
|
|||
r.SetRetries(retries)
|
||||
require.Equal(t, retries, r.Retries())
|
||||
|
||||
passSG := []*oid.ID{test.ID(), test.ID()}
|
||||
passSG := []*oid.ID{oidtest.ID(), oidtest.ID()}
|
||||
r.SetPassSG(passSG)
|
||||
require.Equal(t, passSG, r.PassSG())
|
||||
|
||||
failSG := []*oid.ID{test.ID(), test.ID()}
|
||||
failSG := []*oid.ID{oidtest.ID(), oidtest.ID()}
|
||||
r.SetFailSG(failSG)
|
||||
require.Equal(t, failSG, r.FailSG())
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"github.com/nspcc-dev/neofs-sdk-go/audit"
|
||||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
versiontest "github.com/nspcc-dev/neofs-sdk-go/version/test"
|
||||
)
|
||||
|
||||
|
@ -30,8 +30,8 @@ func Result() *audit.Result {
|
|||
[]byte("node3"),
|
||||
[]byte("node4"),
|
||||
})
|
||||
x.SetPassSG([]*oid.ID{test.ID(), test.ID()})
|
||||
x.SetFailSG([]*oid.ID{test.ID(), test.ID()})
|
||||
x.SetPassSG([]*oid.ID{oidtest.ID(), oidtest.ID()})
|
||||
x.SetFailSG([]*oid.ID{oidtest.ID(), oidtest.ID()})
|
||||
|
||||
return x
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test"
|
||||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
ownertest "github.com/nspcc-dev/neofs-sdk-go/owner/test"
|
||||
versiontest "github.com/nspcc-dev/neofs-sdk-go/version/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -156,7 +156,7 @@ func TestRecord_ToV2(t *testing.T) {
|
|||
func TestReservedRecords(t *testing.T) {
|
||||
var (
|
||||
v = versiontest.Version()
|
||||
oid = test.ID()
|
||||
oid = oidtest.ID()
|
||||
cid = cidtest.ID()
|
||||
ownerid = ownertest.ID()
|
||||
h = checksumtest.Checksum()
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
ownertest "github.com/nspcc-dev/neofs-sdk-go/owner/test"
|
||||
sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test"
|
||||
sigtest "github.com/nspcc-dev/neofs-sdk-go/signature/test"
|
||||
|
@ -45,7 +45,7 @@ func SplitID() *object.SplitID {
|
|||
func generateRaw(withParent bool) *object.RawObject {
|
||||
x := object.NewRaw()
|
||||
|
||||
x.SetID(test.ID())
|
||||
x.SetID(oidtest.ID())
|
||||
x.SetSessionToken(sessiontest.Token())
|
||||
x.SetPayload([]byte{1, 2, 3})
|
||||
x.SetOwnerID(ownertest.ID())
|
||||
|
@ -54,9 +54,9 @@ func generateRaw(withParent bool) *object.RawObject {
|
|||
x.SetVersion(version.Current())
|
||||
x.SetPayloadSize(111)
|
||||
x.SetCreationEpoch(222)
|
||||
x.SetPreviousID(test.ID())
|
||||
x.SetParentID(test.ID())
|
||||
x.SetChildren(test.ID(), test.ID())
|
||||
x.SetPreviousID(oidtest.ID())
|
||||
x.SetParentID(oidtest.ID())
|
||||
x.SetChildren(oidtest.ID(), oidtest.ID())
|
||||
x.SetAttributes(Attribute(), Attribute())
|
||||
x.SetSplitID(SplitID())
|
||||
x.SetPayloadChecksum(checksumtest.Checksum())
|
||||
|
@ -86,7 +86,7 @@ func Tombstone() *object.Tombstone {
|
|||
|
||||
x.SetSplitID(SplitID())
|
||||
x.SetExpirationEpoch(13)
|
||||
x.SetMembers([]*oid.ID{test.ID(), test.ID()})
|
||||
x.SetMembers([]*oid.ID{oidtest.ID(), oidtest.ID()})
|
||||
|
||||
return x
|
||||
}
|
||||
|
@ -96,8 +96,8 @@ func SplitInfo() *object.SplitInfo {
|
|||
x := object.NewSplitInfo()
|
||||
|
||||
x.SetSplitID(SplitID())
|
||||
x.SetLink(test.ID())
|
||||
x.SetLastPart(test.ID())
|
||||
x.SetLink(oidtest.ID())
|
||||
x.SetLastPart(oidtest.ID())
|
||||
|
||||
return x
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ func SplitInfo() *object.SplitInfo {
|
|||
func SearchFilters() object.SearchFilters {
|
||||
x := object.NewSearchFilters()
|
||||
|
||||
x.AddObjectIDFilter(object.MatchStringEqual, test.ID())
|
||||
x.AddObjectIDFilter(object.MatchStringEqual, oidtest.ID())
|
||||
x.AddObjectContainerIDFilter(object.MatchStringNotEqual, cidtest.ID())
|
||||
|
||||
return x
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
v2session "github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
objecttest "github.com/nspcc-dev/neofs-sdk-go/object/address/test"
|
||||
addresstest "github.com/nspcc-dev/neofs-sdk-go/object/address/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/session"
|
||||
sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -52,7 +52,7 @@ func TestObjectContextVerbs(t *testing.T) {
|
|||
|
||||
func TestObjectContext_ApplyTo(t *testing.T) {
|
||||
c := session.NewObjectContext()
|
||||
id := objecttest.Address()
|
||||
id := addresstest.Address()
|
||||
|
||||
t.Run("method", func(t *testing.T) {
|
||||
c.ApplyTo(id)
|
||||
|
|
|
@ -3,7 +3,7 @@ package sessiontest
|
|||
import (
|
||||
"math/rand"
|
||||
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/address/test"
|
||||
addresstest "github.com/nspcc-dev/neofs-sdk-go/object/address/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/session"
|
||||
)
|
||||
|
||||
|
@ -24,7 +24,7 @@ func ObjectContext() *session.ObjectContext {
|
|||
|
||||
setters[rand.Uint32()%uint32(len(setters))]()
|
||||
|
||||
c.ApplyTo(oidtest.Address())
|
||||
c.ApplyTo(addresstest.Address())
|
||||
|
||||
return c
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
storagegroupV2 "github.com/nspcc-dev/neofs-api-go/v2/storagegroup"
|
||||
checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/storagegroup"
|
||||
storagegrouptest "github.com/nspcc-dev/neofs-sdk-go/storagegroup/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -27,7 +27,7 @@ func TestStorageGroup(t *testing.T) {
|
|||
sg.SetExpirationEpoch(exp)
|
||||
require.Equal(t, exp, sg.ExpirationEpoch())
|
||||
|
||||
members := []*oid.ID{test.ID(), test.ID()}
|
||||
members := []*oid.ID{oidtest.ID(), oidtest.ID()}
|
||||
sg.SetMembers(members)
|
||||
require.Equal(t, members, sg.Members())
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package storagegrouptest
|
|||
import (
|
||||
checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/storagegroup"
|
||||
)
|
||||
|
||||
|
@ -14,7 +14,7 @@ func StorageGroup() *storagegroup.StorageGroup {
|
|||
x.SetExpirationEpoch(66)
|
||||
x.SetValidationDataSize(322)
|
||||
x.SetValidationDataHash(checksumtest.Checksum())
|
||||
x.SetMembers([]*oid.ID{test.ID(), test.ID()})
|
||||
x.SetMembers([]*oid.ID{oidtest.ID(), oidtest.ID()})
|
||||
|
||||
return x
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue