Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik committed Mar 2, 2022
1 parent 4c2855b commit c83bf8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/networkservice/chains/nsmgr/heal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,9 @@ func testForwarderShouldBeSelectedCorrectlyOnNSMgrRestart(t *testing.T, nodeNum,
require.NoError(t, err)

_, err = domain.Nodes[nodeNum].NSMgr.NetworkServiceEndpointRegistryServer().Register(ctx, &registry.NetworkServiceEndpoint{
Name: "my-nse-1",
Name: nseReg.Name,
Url: nseEntry.URL.String(),
NetworkServiceNames: []string{"my-ns"},
NetworkServiceNames: nseReg.NetworkServiceNames,
})
require.NoError(t, err)
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/networkservice/common/discoverforwarder/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ func (d *discoverForwarderServer) Request(ctx context.Context, request *networks
}

segments := request.Connection.GetPath().GetPathSegments()
datapathForwarder := ""
if pathIndex := int(request.Connection.GetPath().Index); len(segments) > pathIndex+1 {
datapathForwarder = segments[pathIndex+1].Name
datapathForwarder := segments[pathIndex+1].Name
for i, candidate := range nses {
if candidate.Name == datapathForwarder {
nses[0], nses[i] = nses[i], nses[0]
Expand Down

0 comments on commit c83bf8e

Please sign in to comment.