frostfs-node/pkg/core/container/container_test.go
Stanislav Bogatyrev b7b5079934 Add Inner Ring code
2020-07-24 17:07:37 +03:00

30 lines
593 B
Go

package container
import (
"testing"
"github.com/nspcc-dev/neofs-node/pkg/core/container/acl/basic"
"github.com/stretchr/testify/require"
)
func TestContainerMethods(t *testing.T) {
c := new(Container)
acl := basic.FromUint32(1)
c.SetBasicACL(acl)
require.True(t, basic.Equal(acl, c.BasicACL()))
ownerID := OwnerID{1, 2, 3}
c.SetOwnerID(ownerID)
require.Equal(t, ownerID, c.OwnerID())
salt := []byte{4, 5, 6}
c.SetSalt(salt)
require.Equal(t, salt, c.Salt())
rule := PlacementRule{
ReplFactor: 1,
}
c.SetPlacementRule(rule)
require.Equal(t, rule, c.PlacementRule())
}