@@ -211,21 +211,33 @@ func TestEnterprise(t *testing.T) {
211
211
assert .Equal (t , "Cable/DSL" , record .Traits .ConnectionType )
212
212
assert .Equal (t , "frpt.net" , record .Traits .Domain )
213
213
assert .Equal (t , float64 (0.34 ), record .Traits .StaticIPScore )
214
+
215
+ record , err = reader .Enterprise (net .ParseIP ("149.101.100.0" ))
216
+ require .NoError (t , err )
217
+
218
+ assert .Equal (t , uint (6167 ), record .Traits .AutonomousSystemNumber )
219
+
220
+ assert .Equal (t , "CELLCO-PART" , record .Traits .AutonomousSystemOrganization )
221
+ assert .Equal (t , "Verizon Wireless" , record .Traits .ISP )
222
+ assert .Equal (t , "310" , record .Traits .MobileCountryCode )
223
+ assert .Equal (t , "004" , record .Traits .MobileNetworkCode )
214
224
}
215
225
216
226
func TestISP (t * testing.T ) {
217
227
reader , err := Open ("test-data/test-data/GeoIP2-ISP-Test.mmdb" )
218
228
assert .Nil (t , err )
219
229
defer reader .Close ()
220
230
221
- record , err := reader .ISP (net .ParseIP ("1.128.0 .0" ))
231
+ record , err := reader .ISP (net .ParseIP ("149.101.100 .0" ))
222
232
assert .Nil (t , err )
223
233
224
- assert .Equal (t , uint (1221 ), record .AutonomousSystemNumber )
234
+ assert .Equal (t , uint (6167 ), record .AutonomousSystemNumber )
225
235
226
- assert .Equal (t , "Telstra Pty Ltd" , record .AutonomousSystemOrganization )
227
- assert .Equal (t , "Telstra Internet" , record .ISP )
228
- assert .Equal (t , "Telstra Internet" , record .Organization )
236
+ assert .Equal (t , "CELLCO-PART" , record .AutonomousSystemOrganization )
237
+ assert .Equal (t , "Verizon Wireless" , record .ISP )
238
+ assert .Equal (t , "310" , record .MobileCountryCode )
239
+ assert .Equal (t , "004" , record .MobileNetworkCode )
240
+ assert .Equal (t , "Verizon Wireless" , record .Organization )
229
241
}
230
242
231
243
// This ensures the compiler does not optimize away the function call
0 commit comments