(t *testing.T, endpointPattern string, clus *integration.Cluster, tlsConfig *tls.Config)
| 127 | } |
| 128 | |
| 129 | func setupClient(t *testing.T, endpointPattern string, clus *integration.Cluster, tlsConfig *tls.Config) *clientv3.Client { |
| 130 | t.Helper() |
| 131 | endpoints := templateEndpoints(t, endpointPattern, clus) |
| 132 | kv, err := clientv3.New(clientv3.Config{ |
| 133 | Endpoints: endpoints, |
| 134 | DialTimeout: 5 * time.Second, |
| 135 | DialOptions: []grpc.DialOption{grpc.WithBlock()}, |
| 136 | TLS: tlsConfig, |
| 137 | }) |
| 138 | require.NoError(t, err) |
| 139 | return kv |
| 140 | } |
| 141 | |
| 142 | func templateEndpoints(t *testing.T, pattern string, clus *integration.Cluster) []string { |
| 143 | t.Helper() |
no test coverage detected
searching dependent graphs…