From 53697081ceabc6c8c830860fe0576f2630c788b9 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 5 Nov 2020 14:15:54 +0300 Subject: [PATCH] [#189] sdk: Fix type conflicts after netmap package refactoring Signed-off-by: Leonard Lyubich --- pkg/client/client_test.go | 2 +- pkg/container/container.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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))