func runTestGrpcServer() *grpc.Server {
	lis, err := net.Listen("tcp", fmt.Sprintf(":%d", testServerPort))
	if err != nil {
		log.Fatalf("failed to listen: %v", err)
	}
	s := grpc.NewServer()
	cni.RegisterRemoteCNIServer(s, &testCNIServer{})
	go func() {
		if err := s.Serve(lis); err != nil {
			log.Fatalf("failed to serve: %v", err)
		}
	}()
	return s
}
runTestGrpcServer starts a testing gRPC server with testCNIServer implementation.
package main
import (
	"fmt"
	"log"
	"net"
	"testing"
	"github.com/containernetworking/cni/pkg/skel"
	"github.com/contiv/vpp/plugins/podmanager/cni"
	"golang.org/x/net/context"
	"google.golang.org/grpc"
	. "github.com/onsi/gomega"
)
const (
	testServerPort = 59111  
)
type testCNIServer struct{}
func (s *testCNIServer) Add(context.Context, *cni.CNIRequest) (*cni.CNIReply, error) {
	fmt.Println("ADD called")
	return &cni.CNIReply{
		Result: 0,
		Error:  "",
		Interfaces: []*cni.CNIReply_Interface{
			{
				Name: "eth0",
				IpAddresses: []*cni.CNIReply_Interface_IP{
					{
						Address: "192.168.1.53/24",
						Version: cni.CNIReply_Interface_IP_IPV4,
						Gateway: "192.168.1.1",
					},
					{
						Address: "2001:db8::68/64",
						Version: cni.CNIReply_Interface_IP_IPV6,
						Gateway: "2001:db8::1",
					},
				},
			},
		},
		Routes: []*cni.CNIReply_Route{
			{
				Dst: "192.168.1.0/24",
				Gw:  "192.168.1.1",
			},
			{
				Dst: "2001:db8::68/64",
				Gw:  "2001:db8::1",
			},
		},
		Dns: []*cni.CNIReply_DNS{
			{
				Nameservers: []string{"8.8.8.8"},
			},
		},
	}, nil
}
func (s *testCNIServer) Delete(context.Context, *cni.CNIRequest) (*cni.CNIReply, error) {
	fmt.Println("DELETE called")
	return &cni.CNIReply{
		Result: 0,
		Error:  "",
	}, nil
}