Add testing package
This already includes a bunch of helper functions that aid in testing. Factor out etcd and file testing to use this package. Fixes: #50
This commit is contained in:
parent
5a919198ac
commit
6eae17b0bd
9 changed files with 295 additions and 304 deletions
|
@ -16,7 +16,7 @@ func (e Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
|
|||
// are not auth. for *but* do have a stubzone forward for. If we do the stubzone
|
||||
// handler will handle the request.
|
||||
name := state.Name()
|
||||
if len(*e.Stubmap) > 0 {
|
||||
if e.Stubmap != nil && len(*e.Stubmap) > 0 {
|
||||
for zone, _ := range *e.Stubmap {
|
||||
if strings.HasSuffix(name, zone) {
|
||||
stub := Stub{Etcd: e, Zone: zone}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue