aboutsummaryrefslogtreecommitdiff
path: root/middleware/proxy/grpc_test.go
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com> 2017-08-09 09:21:33 -0700
committerGravatar GitHub <noreply@github.com> 2017-08-09 09:21:33 -0700
commita1b175ef78783df180dffe50d756a85c66cfb1b7 (patch)
tree19821a7943943677529ff92c31940335cf9e009e /middleware/proxy/grpc_test.go
parent57692bbccf59aa3eff71ce65739ae195973e5e61 (diff)
downloadcoredns-a1b175ef78783df180dffe50d756a85c66cfb1b7.tar.gz
coredns-a1b175ef78783df180dffe50d756a85c66cfb1b7.tar.zst
coredns-a1b175ef78783df180dffe50d756a85c66cfb1b7.zip
Move Healthcheck to middleware/pkg/healthcheck (#854)
* Move healthcheck out Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Move healthcheck to middleware/pkg/healthcheck Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'middleware/proxy/grpc_test.go')
-rw-r--r--middleware/proxy/grpc_test.go20
1 files changed, 11 insertions, 9 deletions
diff --git a/middleware/proxy/grpc_test.go b/middleware/proxy/grpc_test.go
index e303e1594..dcde7cc0e 100644
--- a/middleware/proxy/grpc_test.go
+++ b/middleware/proxy/grpc_test.go
@@ -4,11 +4,13 @@ import (
"testing"
"time"
+ "github.com/coredns/coredns/middleware/pkg/healthcheck"
+
"google.golang.org/grpc/grpclog"
)
-func pool() []*UpstreamHost {
- return []*UpstreamHost{
+func pool() []*healthcheck.UpstreamHost {
+ return []*healthcheck.UpstreamHost{
{
Name: "localhost:10053",
},
@@ -22,13 +24,13 @@ func TestStartupShutdown(t *testing.T) {
grpclog.SetLogger(discard{})
upstream := &staticUpstream{
- from: ".",
- Hosts: pool(),
- Policy: &Random{},
- Spray: nil,
- FailTimeout: 10 * time.Second,
- Future: 60 * time.Second,
- MaxFails: 1,
+ from: ".",
+ HealthCheck: healthcheck.HealthCheck{
+ Hosts: pool(),
+ FailTimeout: 10 * time.Second,
+ Future: 60 * time.Second,
+ MaxFails: 1,
+ },
}
g := newGrpcClient(nil, upstream)
upstream.ex = g