forked from TrueCloudLab/frostfs-sdk-go
Alex Vanin
94476f9055
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
26 lines
591 B
Go
26 lines
591 B
Go
package object_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
|
usertest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user/test"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestInitCreation(t *testing.T) {
|
|
var o object.Object
|
|
cnr := cidtest.ID()
|
|
own := *usertest.ID()
|
|
|
|
object.InitCreation(&o, object.RequiredFields{
|
|
Container: cnr,
|
|
Owner: own,
|
|
})
|
|
|
|
cID, set := o.ContainerID()
|
|
require.True(t, set)
|
|
require.Equal(t, cnr, cID)
|
|
require.Equal(t, &own, o.OwnerID())
|
|
}
|