@@ -54,12 +54,12 @@ public static void loadDatabaseReaders() throws IOException {
5454 Path configDir = createTempDir ();
5555 Path geoIpConfigDir = configDir .resolve ("ingest-geoip" );
5656 Files .createDirectories (geoIpConfigDir );
57- Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-City.mmdb.gz " )),
58- geoIpConfigDir .resolve ("GeoLite2-City.mmdb.gz " ));
59- Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-Country.mmdb.gz " )),
60- geoIpConfigDir .resolve ("GeoLite2-Country.mmdb.gz " ));
61- Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-ASN.mmdb.gz " )),
62- geoIpConfigDir .resolve ("GeoLite2-ASN.mmdb.gz " ));
57+ Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-City.mmdb" )),
58+ geoIpConfigDir .resolve ("GeoLite2-City.mmdb" ));
59+ Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-Country.mmdb" )),
60+ geoIpConfigDir .resolve ("GeoLite2-Country.mmdb" ));
61+ Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-ASN.mmdb" )),
62+ geoIpConfigDir .resolve ("GeoLite2-ASN.mmdb" ));
6363
6464 NodeCache cache = randomFrom (NoCache .getInstance (), new GeoIpCache (randomNonNegativeLong ()));
6565 databaseReaders = IngestGeoIpPlugin .loadDatabaseReaders (geoIpConfigDir , cache );
@@ -111,7 +111,7 @@ public void testCountryBuildDefaults() throws Exception {
111111
112112 Map <String , Object > config = new HashMap <>();
113113 config .put ("field" , "_field" );
114- config .put ("database_file" , "GeoLite2-Country.mmdb.gz " );
114+ config .put ("database_file" , "GeoLite2-Country.mmdb" );
115115 String processorTag = randomAlphaOfLength (10 );
116116
117117 GeoIpProcessor processor = factory .create (null , processorTag , config );
@@ -129,7 +129,7 @@ public void testAsnBuildDefaults() throws Exception {
129129
130130 Map <String , Object > config = new HashMap <>();
131131 config .put ("field" , "_field" );
132- config .put ("database_file" , "GeoLite2-ASN.mmdb.gz " );
132+ config .put ("database_file" , "GeoLite2-ASN.mmdb" );
133133 String processorTag = randomAlphaOfLength (10 );
134134
135135 GeoIpProcessor processor = factory .create (null , processorTag , config );
@@ -157,7 +157,7 @@ public void testBuildDbFile() throws Exception {
157157 GeoIpProcessor .Factory factory = new GeoIpProcessor .Factory (databaseReaders );
158158 Map <String , Object > config = new HashMap <>();
159159 config .put ("field" , "_field" );
160- config .put ("database_file" , "GeoLite2-Country.mmdb.gz " );
160+ config .put ("database_file" , "GeoLite2-Country.mmdb" );
161161 GeoIpProcessor processor = factory .create (null , null , config );
162162 assertThat (processor .getField (), equalTo ("_field" ));
163163 assertThat (processor .getTargetField (), equalTo ("geoip" ));
@@ -170,7 +170,7 @@ public void testBuildWithCountryDbAndAsnFields() throws Exception {
170170 GeoIpProcessor .Factory factory = new GeoIpProcessor .Factory (databaseReaders );
171171 Map <String , Object > config = new HashMap <>();
172172 config .put ("field" , "_field" );
173- config .put ("database_file" , "GeoLite2-Country.mmdb.gz " );
173+ config .put ("database_file" , "GeoLite2-Country.mmdb" );
174174 EnumSet <GeoIpProcessor .Property > asnOnlyProperties = EnumSet .copyOf (GeoIpProcessor .Property .ALL_ASN_PROPERTIES );
175175 asnOnlyProperties .remove (GeoIpProcessor .Property .IP );
176176 String asnProperty = RandomPicks .randomFrom (Randomness .get (), asnOnlyProperties ).toString ();
@@ -184,7 +184,7 @@ public void testBuildWithAsnDbAndCityFields() throws Exception {
184184 GeoIpProcessor .Factory factory = new GeoIpProcessor .Factory (databaseReaders );
185185 Map <String , Object > config = new HashMap <>();
186186 config .put ("field" , "_field" );
187- config .put ("database_file" , "GeoLite2-ASN.mmdb.gz " );
187+ config .put ("database_file" , "GeoLite2-ASN.mmdb" );
188188 EnumSet <GeoIpProcessor .Property > cityOnlyProperties = EnumSet .copyOf (GeoIpProcessor .Property .ALL_CITY_PROPERTIES );
189189 cityOnlyProperties .remove (GeoIpProcessor .Property .IP );
190190 String cityProperty = RandomPicks .randomFrom (Randomness .get (), cityOnlyProperties ).toString ();
@@ -199,9 +199,9 @@ public void testBuildNonExistingDbFile() throws Exception {
199199
200200 Map <String , Object > config = new HashMap <>();
201201 config .put ("field" , "_field" );
202- config .put ("database_file" , "does-not-exist.mmdb.gz " );
202+ config .put ("database_file" , "does-not-exist.mmdb" );
203203 Exception e = expectThrows (ElasticsearchParseException .class , () -> factory .create (null , null , config ));
204- assertThat (e .getMessage (), equalTo ("[database_file] database file [does-not-exist.mmdb.gz ] doesn't exist" ));
204+ assertThat (e .getMessage (), equalTo ("[database_file] database file [does-not-exist.mmdb] doesn't exist" ));
205205 }
206206
207207 public void testBuildFields () throws Exception {
@@ -249,12 +249,12 @@ public void testLazyLoading() throws Exception {
249249 Path configDir = createTempDir ();
250250 Path geoIpConfigDir = configDir .resolve ("ingest-geoip" );
251251 Files .createDirectories (geoIpConfigDir );
252- Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-City.mmdb.gz " )),
253- geoIpConfigDir .resolve ("GeoLite2-City.mmdb.gz " ));
254- Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-Country.mmdb.gz " )),
255- geoIpConfigDir .resolve ("GeoLite2-Country.mmdb.gz " ));
256- Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-ASN.mmdb.gz " )),
257- geoIpConfigDir .resolve ("GeoLite2-ASN.mmdb.gz " ));
252+ Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-City.mmdb" )),
253+ geoIpConfigDir .resolve ("GeoLite2-City.mmdb" ));
254+ Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-Country.mmdb" )),
255+ geoIpConfigDir .resolve ("GeoLite2-Country.mmdb" ));
256+ Files .copy (new ByteArrayInputStream (StreamsUtils .copyToBytesFromClasspath ("/GeoLite2-ASN.mmdb" )),
257+ geoIpConfigDir .resolve ("GeoLite2-ASN.mmdb" ));
258258
259259 // Loading another database reader instances, because otherwise we can't test lazy loading as the
260260 // database readers used at class level are reused between tests. (we want to keep that otherwise running this
@@ -268,15 +268,15 @@ public void testLazyLoading() throws Exception {
268268
269269 Map <String , Object > config = new HashMap <>();
270270 config .put ("field" , "_field" );
271- config .put ("database_file" , "GeoLite2-City.mmdb.gz " );
271+ config .put ("database_file" , "GeoLite2-City.mmdb" );
272272 factory .create (null , "_tag" , config );
273273 config = new HashMap <>();
274274 config .put ("field" , "_field" );
275- config .put ("database_file" , "GeoLite2-Country.mmdb.gz " );
275+ config .put ("database_file" , "GeoLite2-Country.mmdb" );
276276 factory .create (null , "_tag" , config );
277277 config = new HashMap <>();
278278 config .put ("field" , "_field" );
279- config .put ("database_file" , "GeoLite2-ASN.mmdb.gz " );
279+ config .put ("database_file" , "GeoLite2-ASN.mmdb" );
280280 factory .create (null , "_tag" , config );
281281
282282 for (DatabaseReaderLazyLoader lazyLoader : databaseReaders .values ()) {
0 commit comments