mirror of
https://github.com/status-im/consul.git
synced 2025-02-20 09:28:34 +00:00
* Implement the ServerDiscovery.WatchServers gRPC endpoint * Fix the ConnectCA.Sign gRPC endpoints metadata forwarding. * Unify public gRPC endpoints around the public.TraceID function for request_id logging
26 lines
603 B
Go
26 lines
603 B
Go
package dataplane
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/hashicorp/consul/agent/grpc/public/testutils"
|
|
"github.com/hashicorp/consul/proto-public/pbdataplane"
|
|
"github.com/stretchr/testify/require"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
func testClient(t *testing.T, server *Server) pbdataplane.DataplaneServiceClient {
|
|
t.Helper()
|
|
|
|
addr := testutils.RunTestServer(t, server)
|
|
|
|
conn, err := grpc.DialContext(context.Background(), addr.String(), grpc.WithInsecure())
|
|
require.NoError(t, err)
|
|
t.Cleanup(func() {
|
|
require.NoError(t, conn.Close())
|
|
})
|
|
|
|
return pbdataplane.NewDataplaneServiceClient(conn)
|
|
}
|