diff options
Diffstat (limited to 'test/server.go')
-rw-r--r-- | test/server.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/server.go b/test/server.go index d472cc7d0..b290d5a22 100644 --- a/test/server.go +++ b/test/server.go @@ -3,6 +3,7 @@ package test import ( "io/ioutil" "log" + "sync" "github.com/miekg/coredns/core/dnsserver" @@ -12,8 +13,12 @@ import ( "github.com/mholt/caddy" ) +var mu sync.Mutex + // CoreDNSServer returns a CoreDNS test server. It just takes a normal Corefile as input. func CoreDNSServer(corefile string) (*caddy.Instance, error) { + mu.Lock() + defer mu.Unlock() caddy.Quiet = true dnsserver.Quiet = true log.SetOutput(ioutil.Discard) |