diff options
author | 2017-08-09 09:21:33 -0700 | |
---|---|---|
committer | 2017-08-09 09:21:33 -0700 | |
commit | a1b175ef78783df180dffe50d756a85c66cfb1b7 (patch) | |
tree | 19821a7943943677529ff92c31940335cf9e009e /middleware/proxy/grpc_test.go | |
parent | 57692bbccf59aa3eff71ce65739ae195973e5e61 (diff) | |
download | coredns-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.go | 20 |
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 |