From 32bad8e9a80f482b35fcd17eae46fac1bbcff40b Mon Sep 17 00:00:00 2001 From: Piotr Tabor Date: Mon, 7 Sep 2020 14:39:26 +0200 Subject: [PATCH] integration/cluster_proxy.go: Fix broken build with tags=cov. Prior to the fix: ``` go test -mod=mod -timeout 30m -tags cluster_proxy "./integration/..." ``` Was failing with: ``` integration/cluster_proxy.go:58:37: not enough arguments in call to grpcproxy.NewWatchProxy have (*clientv3.Client) want (*zap.Logger, *clientv3.Client) FAIL go.etcd.io/etcd/v3/integration [build failed] ``` --- integration/cluster_proxy.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integration/cluster_proxy.go b/integration/cluster_proxy.go index 8ad7f6910..16587bf3c 100644 --- a/integration/cluster_proxy.go +++ b/integration/cluster_proxy.go @@ -45,6 +45,8 @@ func toGRPC(c *clientv3.Client) grpcAPI { pmu.Lock() defer pmu.Unlock() + lg := zap.NewExample() + if v, ok := proxies[c]; ok { return v.grpc } @@ -55,10 +57,10 @@ func toGRPC(c *clientv3.Client) grpcAPI { c.Lease = namespace.NewLease(c.Lease, proxyNamespace) // test coalescing/caching proxy kvp, kvpch := grpcproxy.NewKvProxy(c) - wp, wpch := grpcproxy.NewWatchProxy(c) + wp, wpch := grpcproxy.NewWatchProxy(lg, c) lp, lpch := grpcproxy.NewLeaseProxy(c) mp := grpcproxy.NewMaintenanceProxy(c) - clp, _ := grpcproxy.NewClusterProxy(zap.NewExample(), c, "", "") // without registering proxy URLs + clp, _ := grpcproxy.NewClusterProxy(lg, c, "", "") // without registering proxy URLs authp := grpcproxy.NewAuthProxy(c) lockp := grpcproxy.NewLockProxy(c) electp := grpcproxy.NewElectionProxy(c)