tests: clean up output

Some document improvements and add a few more tests.
This commit is contained in:
Miek Gieben
2016-10-08 16:44:43 +01:00
parent e43384b501
commit e8b4412564
8 changed files with 53 additions and 13 deletions

View File

@@ -1,6 +1,11 @@
package test
import (
"io/ioutil"
"log"
"github.com/miekg/coredns/core/dnsserver"
// Hook in CoreDNS.
_ "github.com/miekg/coredns/core"
@@ -10,6 +15,9 @@ import (
// CoreDNSServer returns a CoreDNS test server. It just takes a normal Corefile as input.
func CoreDNSServer(corefile string) (*caddy.Instance, error) {
caddy.Quiet = true
dnsserver.Quiet = true
log.SetOutput(ioutil.Discard)
return caddy.Start(NewInput(corefile))
}