middleware/etcd: add setup_test.go (#304)

Add tests for parsing etcd Corefile stanza. Discover a bug in the code,
fix that as well.
This commit is contained in:
Miek Gieben
2016-09-26 14:43:38 +01:00
committed by GitHub
parent 6a7db541fa
commit 77947fd51a
3 changed files with 70 additions and 2 deletions

View File

@@ -27,6 +27,8 @@ type Etcd struct {
Inflight *singleflight.Group
Stubmap *map[string]proxy.Proxy // list of proxies for stub resolving.
Debug bool // Do we allow debug queries.
endpoints []string // Stored here as well, to aid in testing.
}
// Records looks up records in etcd. If exact is true, it will lookup just