Skip to content

Commit c02a106

Browse files
committed
Test Runner: Delete geoip databases in wipe_cluster
1 parent 9c97486 commit c02a106

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

elasticsearch-api/api-spec-testing/wipe_cluster.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def wipe_cluster(client)
123123
wipe_searchable_snapshot_indices(client) if @has_xpack
124124
wipe_snapshots(client)
125125
wipe_datastreams(client)
126+
wipe_geoip_databases(client)
126127
wipe_all_indices(client)
127128
wipe_all_templates(client)
128129
wipe_cluster_settings(client)
@@ -266,6 +267,11 @@ def wipe_datastreams(client)
266267
end
267268
end
268269

270+
def wipe_geoip_databases(client)
271+
ids = client.ingest.get_geoip_database(id: '*')['databases'].map { |a| a['id'] }.join(',')
272+
client.ingest.delete_geoip_database(id: ids)
273+
end
274+
269275
def wipe_all_indices(client)
270276
client.indices.delete(index: '*,-.ds-ilm-history-*', expand_wildcards: 'open,closed,hidden', ignore: 404)
271277
end

0 commit comments

Comments
 (0)