Skip to content

Commit

Permalink
fix review
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
  • Loading branch information
glazychev-art committed Jul 13, 2021
1 parent 2a95b16 commit 13d42a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/networkservice/common/mechanisms/kernel/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewServer() networkservice.NetworkServiceServer {
func (m *kernelMechanismServer) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*networkservice.Connection, error) {
if mechanism := kernel.ToMechanism(request.GetConnection().GetMechanism()); mechanism != nil {
mechanism.SetNetNSURL((&url.URL{Scheme: "file", Path: netNSFilename}).String())
mechanism.SetInterfaceName(request.GetConnection().GetId())
mechanism.SetInterfaceName(GetNameFromConnection(request.GetConnection()))
}
return next.Server(ctx).Request(ctx, request)
}
Expand Down
7 changes: 4 additions & 3 deletions pkg/networkservice/common/mechanismtranslation/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ import (
)

func kernelMechanism() *networkservice.Mechanism {
request := new(networkservice.NetworkServiceRequest)
request.Connection = &networkservice.Connection{
Id: "id",
request := &networkservice.NetworkServiceRequest{
Connection: &networkservice.Connection{
Id: "id",
},
}
_, _ = kernel.NewClient().Request(context.TODO(), request)
return request.MechanismPreferences[0]
Expand Down

0 comments on commit 13d42a9

Please sign in to comment.