integration: add lock and election services to proxy tests

This commit is contained in:
Anthony Romano
2017-05-10 12:53:39 -07:00
parent 713e006bc6
commit 00da3ca725
5 changed files with 15 additions and 3 deletions

View File

@ -58,6 +58,8 @@ func toGRPC(c *clientv3.Client) grpcAPI {
lp, lpch := grpcproxy.NewLeaseProxy(c)
mp := grpcproxy.NewMaintenanceProxy(c)
clp, _ := grpcproxy.NewClusterProxy(c, "", "") // without registering proxy URLs
lockp := grpcproxy.NewLockProxy(c)
electp := grpcproxy.NewElectionProxy(c)
grpc := grpcAPI{
adapter.ClusterServerToClusterClient(clp),
@ -66,6 +68,8 @@ func toGRPC(c *clientv3.Client) grpcAPI {
adapter.WatchServerToWatchClient(wp),
adapter.MaintenanceServerToMaintenanceClient(mp),
pb.NewAuthClient(c.ActiveConnection()),
adapter.LockServerToLockClient(lockp),
adapter.ElectionServerToElectionClient(electp),
}
proxies[c] = grpcClientProxy{grpc: grpc, wdonec: wpch, kvdonec: kvpch, lpdonec: lpch}
return grpc