@@ -102,35 +102,35 @@ public void testParseLocationDouble() {
102102 public void testAsnFree () {
103103 assumeFalse ("https://github.com/elastic/elasticsearch/issues/114266" , Constants .WINDOWS );
104104 String databaseName = "ip_asn_sample.mmdb" ;
105- String ip = "5.182.109 .0" ;
105+ String ip = "23.32.184 .0" ;
106106 assertExpectedLookupResults (
107107 databaseName ,
108108 ip ,
109109 new IpinfoIpDataLookups .Asn (Database .AsnV2 .properties ()),
110110 Map .ofEntries (
111111 entry ("ip" , ip ),
112- entry ("organization_name" , "M247 Europe SRL " ),
113- entry ("asn" , 9009L ),
114- entry ("network" , "5.182.109 .0/24 " ),
115- entry ("domain" , "m247 .com" )
112+ entry ("organization_name" , "Akamai Technologies, Inc. " ),
113+ entry ("asn" , 16625L ),
114+ entry ("network" , "23.32.184 .0/21 " ),
115+ entry ("domain" , "akamai .com" )
116116 )
117117 );
118118 }
119119
120120 public void testAsnStandard () {
121121 assumeFalse ("https://github.com/elastic/elasticsearch/issues/114266" , Constants .WINDOWS );
122122 String databaseName = "asn_sample.mmdb" ;
123- String ip = "23.53.116 .0" ;
123+ String ip = "69.19.224 .0" ;
124124 assertExpectedLookupResults (
125125 databaseName ,
126126 ip ,
127127 new IpinfoIpDataLookups .Asn (Database .AsnV2 .properties ()),
128128 Map .ofEntries (
129129 entry ("ip" , ip ),
130- entry ("organization_name" , "Akamai Technologies, Inc. " ),
131- entry ("asn" , 32787L ),
132- entry ("network" , "23.53.116 .0/24 " ),
133- entry ("domain" , "akamai .com" ),
130+ entry ("organization_name" , "TPx Communications " ),
131+ entry ("asn" , 14265L ),
132+ entry ("network" , "69.19.224 .0/22 " ),
133+ entry ("domain" , "tpx .com" ),
134134 entry ("type" , "hosting" ),
135135 entry ("country_iso_code" , "US" )
136136 )
@@ -177,25 +177,25 @@ public void testAsnInvariants() {
177177 public void testCountryFree () {
178178 assumeFalse ("https://github.com/elastic/elasticsearch/issues/114266" , Constants .WINDOWS );
179179 String databaseName = "ip_country_sample.mmdb" ;
180- String ip = "4.221.143.168 " ;
180+ String ip = "20.33.76.0 " ;
181181 assertExpectedLookupResults (
182182 databaseName ,
183183 ip ,
184184 new IpinfoIpDataLookups .Country (Database .CountryV2 .properties ()),
185185 Map .ofEntries (
186186 entry ("ip" , ip ),
187- entry ("country_name" , "South Africa " ),
188- entry ("country_iso_code" , "ZA " ),
189- entry ("continent_name" , "Africa " ),
190- entry ("continent_code" , "AF " )
187+ entry ("country_name" , "Ireland " ),
188+ entry ("country_iso_code" , "IE " ),
189+ entry ("continent_name" , "Europe " ),
190+ entry ("continent_code" , "EU " )
191191 )
192192 );
193193 }
194194
195195 public void testGeolocationStandard () {
196196 assumeFalse ("https://github.com/elastic/elasticsearch/issues/114266" , Constants .WINDOWS );
197- String databaseName = "ip_geolocation_sample .mmdb" ;
198- String ip = "2.124.90.182 " ;
197+ String databaseName = "ip_geolocation_standard_sample .mmdb" ;
198+ String ip = "62.69.48.19 " ;
199199 assertExpectedLookupResults (
200200 databaseName ,
201201 ip ,
@@ -215,36 +215,37 @@ public void testGeolocationStandard() {
215215 public void testGeolocationInvariants () {
216216 assumeFalse ("https://github.com/elastic/elasticsearch/issues/114266" , Constants .WINDOWS );
217217 Path configDir = tmpDir ;
218- copyDatabase ("ipinfo/ip_geolocation_sample .mmdb" , configDir .resolve ("ip_geolocation_sample .mmdb" ));
218+ copyDatabase ("ipinfo/ip_geolocation_standard_sample .mmdb" , configDir .resolve ("ip_geolocation_standard_sample .mmdb" ));
219219
220220 {
221221 final Set <String > expectedColumns = Set .of (
222- "network" ,
223222 "city" ,
223+ "geoname_id" ,
224224 "region" ,
225+ "region_code" ,
225226 "country" ,
226227 "postal_code" ,
227228 "timezone" ,
228- "latitude " ,
229- "longitude "
229+ "lat " ,
230+ "lng "
230231 );
231232
232- Path databasePath = configDir .resolve ("ip_geolocation_sample .mmdb" );
233+ Path databasePath = configDir .resolve ("ip_geolocation_standard_sample .mmdb" );
233234 assertDatabaseInvariants (databasePath , (ip , row ) -> {
234235 assertThat (row .keySet (), equalTo (expectedColumns ));
235236 {
236- String latitude = (String ) row .get ("latitude " );
237+ String latitude = (String ) row .get ("lat " );
237238 assertThat (latitude , equalTo (latitude .trim ()));
238239 Double parsed = parseLocationDouble (latitude );
239240 assertThat (parsed , notNullValue ());
240- assertThat (latitude , equalTo (Double .toString (parsed ))); // reverse it
241+ assertThat (Double . parseDouble ( latitude ) , equalTo (Double .parseDouble ( Double . toString (parsed ) ))); // reverse it
241242 }
242243 {
243- String longitude = (String ) row .get ("longitude " );
244+ String longitude = (String ) row .get ("lng " );
244245 assertThat (longitude , equalTo (longitude .trim ()));
245246 Double parsed = parseLocationDouble (longitude );
246247 assertThat (parsed , notNullValue ());
247- assertThat (longitude , equalTo (Double .toString (parsed ))); // reverse it
248+ assertThat (Double . parseDouble ( longitude ) , equalTo (Double .parseDouble ( Double . toString (parsed ) ))); // reverse it
248249 }
249250 });
250251 }
@@ -253,7 +254,7 @@ public void testGeolocationInvariants() {
253254 public void testPrivacyDetectionStandard () {
254255 assumeFalse ("https://github.com/elastic/elasticsearch/issues/114266" , Constants .WINDOWS );
255256 String databaseName = "privacy_detection_sample.mmdb" ;
256- String ip = "1.53.59.33 " ;
257+ String ip = "2.57.109.154 " ;
257258 assertExpectedLookupResults (
258259 databaseName ,
259260 ip ,
@@ -272,16 +273,16 @@ public void testPrivacyDetectionStandard() {
272273 public void testPrivacyDetectionStandardNonEmptyService () {
273274 assumeFalse ("https://github.com/elastic/elasticsearch/issues/114266" , Constants .WINDOWS );
274275 String databaseName = "privacy_detection_sample.mmdb" ;
275- String ip = "216.131.74.65 " ;
276+ String ip = "59.29.201.246 " ;
276277 assertExpectedLookupResults (
277278 databaseName ,
278279 ip ,
279280 new IpinfoIpDataLookups .PrivacyDetection (Database .PrivacyDetection .properties ()),
280281 Map .ofEntries (
281282 entry ("ip" , ip ),
282- entry ("hosting" , true ),
283+ entry ("hosting" , false ),
283284 entry ("proxy" , false ),
284- entry ("service" , "FastVPN " ),
285+ entry ("service" , "VPNGate " ),
285286 entry ("relay" , false ),
286287 entry ("tor" , false ),
287288 entry ("vpn" , true )
@@ -391,13 +392,13 @@ public void testDatabaseTypeParsing() throws IOException {
391392 // pedantic about where precisely it should be.
392393
393394 copyDatabase ("ipinfo/ip_asn_sample.mmdb" , tmpDir .resolve ("ip_asn_sample.mmdb" ));
394- copyDatabase ("ipinfo/ip_geolocation_sample .mmdb" , tmpDir .resolve ("ip_geolocation_sample .mmdb" ));
395+ copyDatabase ("ipinfo/ip_geolocation_standard_sample .mmdb" , tmpDir .resolve ("ip_geolocation_standard_sample .mmdb" ));
395396 copyDatabase ("ipinfo/asn_sample.mmdb" , tmpDir .resolve ("asn_sample.mmdb" ));
396397 copyDatabase ("ipinfo/ip_country_sample.mmdb" , tmpDir .resolve ("ip_country_sample.mmdb" ));
397398 copyDatabase ("ipinfo/privacy_detection_sample.mmdb" , tmpDir .resolve ("privacy_detection_sample.mmdb" ));
398399
399400 assertThat (parseDatabaseFromType ("ip_asn_sample.mmdb" ), is (Database .AsnV2 ));
400- assertThat (parseDatabaseFromType ("ip_geolocation_sample .mmdb" ), is (Database .CityV2 ));
401+ assertThat (parseDatabaseFromType ("ip_geolocation_standard_sample .mmdb" ), is (Database .CityV2 ));
401402 assertThat (parseDatabaseFromType ("asn_sample.mmdb" ), is (Database .AsnV2 ));
402403 assertThat (parseDatabaseFromType ("ip_country_sample.mmdb" ), is (Database .CountryV2 ));
403404 assertThat (parseDatabaseFromType ("privacy_detection_sample.mmdb" ), is (Database .PrivacyDetection ));
0 commit comments