Add a fullblown testing server. This allows us to do integration tests.
Also add a basic proxy test. Further tests will test etcd proxy
and stub zone communication and other "wildish" configurations.
Redo the server startup, so we can access the ports it listens on when
it has started up (with dns.ActivateAndServer).
Extend the .travis file to download etcd and test for that as well.
Put integration tests in test dir
Split up the previous changes a bit. This PR only returns the expected
error when the received packet has the wrong EDNS version.
EDNS0 handling in the middleware needs a nicer abstraction, like
ReflectEdns() or something.
Test shouldTransfer by upping a testserver and sending the SOA query.
Remove state from DefaultErrorHandler and just get it from the request.
Add more logging to show what is going on.
This also adds the infrastructure for future tests.
If monitoring is enabled for one zone, also enable it for when the
server reports REFUSED. Normally the metrics are only enabled if
you enter the middleware, with this you'll see REFUSED queries.
Each of these are reported agains the root zone otherwise
Make the CH middleware actually work. Needs a bit of a hack to route
the fake version.bind and friends zone to the correct handler. Fiddle
with the order in directive.go so that CH queries get logged as well.
Secondly add class rewriting to the rewrite middleware handler and also
log the class by default.
Fix some file/secondary issues when parsing a Corefile, also allow
for multiple origins to be specified. Also don't fail on startup when
a zonetransfer fails.
Fixes: #54