forked from TrueCloudLab/frostfs-sdk-go
[#54] tests: unify test generator names
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
fa7c01bd0b
commit
3d0df0d068
35 changed files with 113 additions and 113 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
func TestAddress_SetContainerID(t *testing.T) {
|
||||
a := NewAddress()
|
||||
|
||||
id := cidtest.GenerateID()
|
||||
id := cidtest.ID()
|
||||
|
||||
a.SetContainerID(id)
|
||||
|
||||
|
@ -30,7 +30,7 @@ func TestAddress_SetObjectID(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestAddress_Parse(t *testing.T) {
|
||||
cid := cidtest.GenerateID()
|
||||
cid := cidtest.ID()
|
||||
|
||||
oid := NewID()
|
||||
oid.SetSHA256(randSHA256Checksum(t))
|
||||
|
@ -63,7 +63,7 @@ func TestAddress_Parse(t *testing.T) {
|
|||
func TestAddressEncoding(t *testing.T) {
|
||||
a := NewAddress()
|
||||
a.SetObjectID(randID(t))
|
||||
a.SetContainerID(cidtest.GenerateID())
|
||||
a.SetContainerID(cidtest.ID())
|
||||
|
||||
t.Run("binary", func(t *testing.T) {
|
||||
data, err := a.Marshal()
|
||||
|
|
|
@ -93,7 +93,7 @@ func TestRawObject_SetPayloadSize(t *testing.T) {
|
|||
func TestRawObject_SetContainerID(t *testing.T) {
|
||||
obj := NewRaw()
|
||||
|
||||
cid := cidtest.GenerateID()
|
||||
cid := cidtest.ID()
|
||||
|
||||
obj.SetContainerID(cid)
|
||||
|
||||
|
@ -103,7 +103,7 @@ func TestRawObject_SetContainerID(t *testing.T) {
|
|||
func TestRawObject_SetOwnerID(t *testing.T) {
|
||||
obj := NewRaw()
|
||||
|
||||
ownerID := ownertest.GenerateID()
|
||||
ownerID := ownertest.ID()
|
||||
|
||||
obj.SetOwnerID(ownerID)
|
||||
|
||||
|
@ -196,7 +196,7 @@ func TestRawObject_SetParent(t *testing.T) {
|
|||
|
||||
par := NewRaw()
|
||||
par.SetID(randID(t))
|
||||
par.SetContainerID(cidtest.GenerateID())
|
||||
par.SetContainerID(cidtest.ID())
|
||||
par.SetSignature(signature.New())
|
||||
|
||||
parObj := par.Object()
|
||||
|
@ -218,7 +218,7 @@ func TestRawObject_ToV2(t *testing.T) {
|
|||
func TestRawObject_SetSessionToken(t *testing.T) {
|
||||
obj := NewRaw()
|
||||
|
||||
tok := sessiontest.Generate()
|
||||
tok := sessiontest.Token()
|
||||
|
||||
obj.SetSessionToken(tok)
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ func IDWithChecksum(cs [sha256.Size]byte) *object.ID {
|
|||
func Address() *object.Address {
|
||||
x := object.NewAddress()
|
||||
|
||||
x.SetContainerID(cidtest.GenerateID())
|
||||
x.SetContainerID(cidtest.ID())
|
||||
x.SetObjectID(ID())
|
||||
|
||||
return x
|
||||
|
@ -75,10 +75,10 @@ func generateRaw(withParent bool) *object.RawObject {
|
|||
x := object.NewRaw()
|
||||
|
||||
x.SetID(ID())
|
||||
x.SetSessionToken(sessiontest.Generate())
|
||||
x.SetSessionToken(sessiontest.Token())
|
||||
x.SetPayload([]byte{1, 2, 3})
|
||||
x.SetOwnerID(ownertest.GenerateID())
|
||||
x.SetContainerID(cidtest.GenerateID())
|
||||
x.SetOwnerID(ownertest.ID())
|
||||
x.SetContainerID(cidtest.ID())
|
||||
x.SetType(object.TypeTombstone)
|
||||
x.SetVersion(version.Current())
|
||||
x.SetPayloadSize(111)
|
||||
|
@ -136,7 +136,7 @@ func SearchFilters() object.SearchFilters {
|
|||
x := object.NewSearchFilters()
|
||||
|
||||
x.AddObjectIDFilter(object.MatchStringEqual, ID())
|
||||
x.AddObjectContainerIDFilter(object.MatchStringNotEqual, cidtest.GenerateID())
|
||||
x.AddObjectContainerIDFilter(object.MatchStringNotEqual, cidtest.ID())
|
||||
|
||||
return x
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue