aboutsummaryrefslogtreecommitdiff
path: root/middleware/etcd/setup_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-10-30 15:54:16 +0000
committerGravatar GitHub <noreply@github.com> 2016-10-30 15:54:16 +0000
commit27d893cf33b81e1a419ec58d0512bd2ecb01b8a2 (patch)
treeb4d1b64a4e14b714dabbaf41a2d92b2054ceb490 /middleware/etcd/setup_test.go
parent81d5baee284063d9d2501fab15138ade5da5180f (diff)
downloadcoredns-27d893cf33b81e1a419ec58d0512bd2ecb01b8a2.tar.gz
coredns-27d893cf33b81e1a419ec58d0512bd2ecb01b8a2.tar.zst
coredns-27d893cf33b81e1a419ec58d0512bd2ecb01b8a2.zip
ServiceBackend interface (#369)
* Add ServiceBackend interface This adds a ServiceBackend interface that is shared between etcd/etcd3 (later) and kubernetes, leading to a massive reduction in code. When returning the specific records from their backend. Fixes #273
Diffstat (limited to 'middleware/etcd/setup_test.go')
-rw-r--r--middleware/etcd/setup_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/middleware/etcd/setup_test.go b/middleware/etcd/setup_test.go
index d7e6e344b..6e1eabdcd 100644
--- a/middleware/etcd/setup_test.go
+++ b/middleware/etcd/setup_test.go
@@ -28,17 +28,16 @@ func init() {
func newEtcdMiddleware() *Etcd {
ctxt, _ = context.WithTimeout(context.Background(), etcdTimeout)
- etcdCfg := etcdc.Config{
- Endpoints: []string{"http://localhost:2379"},
- }
- cli, _ := etcdc.New(etcdCfg)
+ endpoints := []string{"http://localhost:2379"}
+ client, _ := newEtcdClient(endpoints, "", "", "")
+
return &Etcd{
Proxy: proxy.New([]string{"8.8.8.8:53"}),
PathPrefix: "skydns",
Ctx: context.Background(),
Inflight: &singleflight.Group{},
Zones: []string{"skydns.test.", "skydns_extra.test.", "in-addr.arpa."},
- Client: etcdc.NewKeysAPI(cli),
+ Client: client,
}
}