diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index 3aebaab4..50b5f563 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -42,7 +42,7 @@ func TestExample(t *testing.T) { policy := new(netmap.PlacementPolicy) policy.SetContainerBackupFactor(2) - policy.SetReplicas([]*netmap.Replica{replica}) + policy.SetReplicas(replica) // this container has random nonce and it does not set owner id cnr := container.New( diff --git a/pkg/container/container.go b/pkg/container/container.go index a14f2577..df6732fe 100644 --- a/pkg/container/container.go +++ b/pkg/container/container.go @@ -25,7 +25,7 @@ func New(opts ...NewOption) *Container { } if cnrOptions.policy != nil { - cnr.SetPlacementPolicy(cnrOptions.policy) + cnr.SetPlacementPolicy(cnrOptions.policy.ToV2()) } attributes := make([]*container.Attribute, len(cnrOptions.attributes))