Browse Source

fix test

pull/787/merge
Darien Raymond 7 years ago
parent
commit
35545cb2db
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 12
      app/dns/server_test.go

12
app/dns/server_test.go

@ -85,20 +85,20 @@ func TestUDPServer(t *testing.T) {
common.Must(space.Initialize())
common.Must(space.Start())
server := FromSpace(space)
assert(server, IsNotNil)
ips := server.Get("google.com")
ips, err := net.LookupIP("google.com")
assert(err, IsNil)
assert(len(ips), Equals, 1)
assert([]byte(ips[0]), Equals, []byte{8, 8, 8, 8})
ips = server.Get("facebook.com")
ips, err = net.LookupIP("facebook.com")
assert(err, IsNil)
assert(len(ips), Equals, 1)
assert([]byte(ips[0]), Equals, []byte{9, 9, 9, 9})
dnsServer.Shutdown()
ips = server.Get("google.com")
ips, err = net.LookupIP("google.com")
assert(err, IsNil)
assert(len(ips), Equals, 1)
assert([]byte(ips[0]), Equals, []byte{8, 8, 8, 8})
}

Loading…
Cancel
Save