diff --git a/go.mod b/go.mod index 706793d..22ad884 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/golang/protobuf v1.4.3 github.com/google/uuid v1.1.2 github.com/networkservicemesh/api v0.0.0-20210202152048-ec956057eb3a - github.com/networkservicemesh/sdk v0.0.0-20210208040156-d1280dd2605c + github.com/networkservicemesh/sdk v0.0.0-20210208092844-64f6aa269f63 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.7.0 github.com/stretchr/testify v1.6.1 diff --git a/go.sum b/go.sum index d09c07d..b7d06d1 100644 --- a/go.sum +++ b/go.sum @@ -372,8 +372,8 @@ github.com/nats-io/stan.go v0.6.0/go.mod h1:eIcD5bi3pqbHT/xIIvXMwvzXYElgouBvaVRf github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/networkservicemesh/api v0.0.0-20210202152048-ec956057eb3a h1:26MmmU399gnahAC+f6OfWsP5MpnLdJ4UjvBa6fXYvNU= github.com/networkservicemesh/api v0.0.0-20210202152048-ec956057eb3a/go.mod h1:qvxdY1Zt4QTtiG+uH1XmjpegeHjlt5Jj4A8iK55iJPI= -github.com/networkservicemesh/sdk v0.0.0-20210208040156-d1280dd2605c h1:KQwMzDjrLMfqn9EcxusZ+EezFE18XvHxmbbLx2UEtpQ= -github.com/networkservicemesh/sdk v0.0.0-20210208040156-d1280dd2605c/go.mod h1:gqv+RfDum4HBeZA0k+F96mT2m0rh9LZTUazjtsLJ0Bs= +github.com/networkservicemesh/sdk v0.0.0-20210208092844-64f6aa269f63 h1:fDvXYI18q3+DIN2zuljZXavL7IILWun2zafTa4llUG8= +github.com/networkservicemesh/sdk v0.0.0-20210208092844-64f6aa269f63/go.mod h1:gqv+RfDum4HBeZA0k+F96mT2m0rh9LZTUazjtsLJ0Bs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/exhaustive v0.0.0-20200811152831-6cf413ae40e0/go.mod h1:wBEpHwM2OdmeNpdCvRPUlkEbBuaFmcK4Wv8Q7FuGW3c= diff --git a/pkg/registry/chains/registryk8s/registry-k8s_test.go b/pkg/registry/chains/registryk8s/registry-k8s_test.go index 8193830..764a884 100644 --- a/pkg/registry/chains/registryk8s/registry-k8s_test.go +++ b/pkg/registry/chains/registryk8s/registry-k8s_test.go @@ -30,9 +30,10 @@ import ( "go.uber.org/goleak" "google.golang.org/grpc" + "github.com/networkservicemesh/sdk/pkg/tools/sandbox" + "github.com/networkservicemesh/sdk-k8s/pkg/registry/chains/registryk8s" "github.com/networkservicemesh/sdk-k8s/pkg/tools/k8s/client/clientset/versioned/fake" - "github.com/networkservicemesh/sdk/pkg/tools/sandbox" registryserver "github.com/networkservicemesh/sdk/pkg/registry" ) @@ -54,10 +55,10 @@ func TestNSMGR_LocalUsecase(t *testing.T) { NetworkServiceNames: []string{"my-service-remote"}, } - _, err := sandbox.NewEndpoint(ctx, nseReg, sandbox.GenerateTestToken, domain.Nodes[0].NSMgr) + _, err := domain.Nodes[0].NewEndpoint(ctx, nseReg, sandbox.GenerateTestToken) require.NoError(t, err) - nsc := sandbox.NewClient(ctx, sandbox.GenerateTestToken, domain.Nodes[0].NSMgr.URL) + nsc := domain.Nodes[0].NewClient(ctx, sandbox.GenerateTestToken) request := &networkservice.NetworkServiceRequest{ MechanismPreferences: []*networkservice.Mechanism{ @@ -108,7 +109,7 @@ func TestNSMGR_RemoteUsecase(t *testing.T) { NetworkServiceNames: []string{"my-service-remote"}, } - _, err := sandbox.NewEndpoint(ctx, nseReg, sandbox.GenerateTestToken, domain.Nodes[0].NSMgr) + _, err := domain.Nodes[0].NewEndpoint(ctx, nseReg, sandbox.GenerateTestToken) require.NoError(t, err) request := &networkservice.NetworkServiceRequest{ @@ -122,7 +123,7 @@ func TestNSMGR_RemoteUsecase(t *testing.T) { }, } - nsc := sandbox.NewClient(ctx, sandbox.GenerateTestToken, domain.Nodes[1].NSMgr.URL) + nsc := domain.Nodes[1].NewClient(ctx, sandbox.GenerateTestToken) conn, err := nsc.Request(ctx, request.Clone()) require.NoError(t, err) @@ -146,12 +147,12 @@ func TestNSMGR_RemoteUsecase(t *testing.T) { require.NotNil(t, e) } -func supplyK8sRegistry(ctx context.Context, proxyRegistryURL *url.URL, options ...grpc.DialOption) registryserver.Registry { +func supplyK8sRegistry(ctx context.Context, expireDuration time.Duration, proxyRegistryURL *url.URL, options ...grpc.DialOption) registryserver.Registry { return registryk8s.NewServer(®istryk8s.Config{ ChainCtx: ctx, Namespace: "default", ClientSet: fake.NewSimpleClientset(), - ExpirePeriod: time.Minute, + ExpirePeriod: expireDuration, ProxyRegistryURL: proxyRegistryURL, }, options...) }