mirror of https://github.com/v2ray/v2ray-core
fix test
parent
7078f23291
commit
35545cb2db
|
@ -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…
Reference in New Issue