diff options
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 |