Make CoreDNS a server type plugin for Caddy (#220)
* Make CoreDNS a server type plugin for Caddy Remove code we don't need and port all middleware over. Fix all tests and rework the documentation. Also make `go generate` build a caddy binary which we then copy into our directory. This means `go build`-builds remain working as-is. And new etc instances in each etcd test for better isolation. Fix more tests and rework test.Server with the newer support Caddy offers. Fix Makefile to support new mode of operation.
This commit is contained in:
parent
a1989c3523
commit
9ac3cab1b7
140 changed files with 2058 additions and 8229 deletions
|
@ -46,13 +46,18 @@ func TestEtcdStubAndProxyLookup(t *testing.T) {
|
|||
proxy . 8.8.8.8:53
|
||||
}`
|
||||
|
||||
etc := etcdMiddleware()
|
||||
ex, _, udp, err := Server(t, corefile)
|
||||
ex, err := CoreDNSServer(corefile)
|
||||
if err != nil {
|
||||
t.Fatalf("Could get server: %s", err)
|
||||
t.Fatalf("could not get CoreDNS serving instance: %s", err)
|
||||
}
|
||||
|
||||
udp, _ := CoreDNSServerPorts(ex, 0)
|
||||
if udp == "" {
|
||||
t.Fatalf("could not get udp listening port")
|
||||
}
|
||||
defer ex.Stop()
|
||||
|
||||
etc := etcdMiddleware()
|
||||
log.SetOutput(ioutil.Discard)
|
||||
|
||||
var ctx = context.TODO()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue