Skip to content

Commit

Permalink
Merge pull request #48 from Bolodya1997/update-master
Browse files Browse the repository at this point in the history
Manually update to the latest sdk version
  • Loading branch information
denis-tingaikin authored Feb 8, 2021
2 parents f34a752 + 71328d1 commit 646833e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
15 changes: 8 additions & 7 deletions pkg/registry/chains/registryk8s/registry-k8s_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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{
Expand Down Expand Up @@ -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{
Expand All @@ -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)
Expand All @@ -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(&registryk8s.Config{
ChainCtx: ctx,
Namespace: "default",
ClientSet: fake.NewSimpleClientset(),
ExpirePeriod: time.Minute,
ExpirePeriod: expireDuration,
ProxyRegistryURL: proxyRegistryURL,
}, options...)
}

0 comments on commit 646833e

Please sign in to comment.