fix whois test
This commit is contained in:
parent
bccb939346
commit
6a0194c7a1
|
@ -27,9 +27,9 @@ func TestWhois(t *testing.T) {
|
||||||
|
|
||||||
w := Whois{timeoutMsec: 5000}
|
w := Whois{timeoutMsec: 5000}
|
||||||
resp, err := w.queryAll("8.8.8.8")
|
resp, err := w.queryAll("8.8.8.8")
|
||||||
assert.True(t, err == nil)
|
assert.Nil(t, err)
|
||||||
m := whoisParse(resp)
|
m := whoisParse(resp)
|
||||||
assert.True(t, m["orgname"] == "Google LLC")
|
assert.Equal(t, "Google LLC", m["orgname"])
|
||||||
assert.True(t, m["country"] == "US")
|
assert.Equal(t, "US", m["country"])
|
||||||
assert.True(t, m["city"] == "Mountain View")
|
assert.Equal(t, "Mountain View", m["city"])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue