Simplify the arguments passed to nameserver/http.go:ServeHTTP() (by using information found in some other objects we are already passing, like the server)

This commit is contained in:
Alvaro Saurin committed 2015-06-10 22:27:49 +02:00
1 parent 5cb2347f77
commit 1889a4a87f
3 files changed
+13 -9

No files matched your search

+5 -2
View File
@@ -27,7 +27,7 @@ func TestHttp(t *testing.T) {
dockerIP = "9.8.7.6"
)
zone, err := NewZoneDb(ZoneConfig{})
zone, err := NewZoneDb(ZoneConfig{Domain: testDomain})
wt.AssertNoErr(t, err)
err = zone.Start()
wt.AssertNoErr(t, err)
@@ -38,8 +38,11 @@ func TestHttp(t *testing.T) {
t.Fatal("Unable to create http listener: ", err)
}
// Create a useless server... it will not even be started
srv, _ := NewDNSServer(DNSServerConfig{Zone: zone})
port := httpListener.Addr().(*net.TCPAddr).Port
go ServeHTTP(httpListener, "", nil, testDomain, zone)
go ServeHTTP(httpListener, "", srv)
// Ask the http server to add our test address into the database
addrParts := strings.Split(testAddr1, "/")