Skip to content

Commit

Permalink
Test Runner: Updates wipe_cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed Sep 18, 2024
1 parent 64eed44 commit e1a4775
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions elasticsearch-api/api-spec-testing/wipe_cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,11 @@ def clear_ml_filters(client)
end

def delete_all_node_shutdown_metadata(client)
nodes = client.shutdown.get_node
return unless nodes['nodes']
nodes = client.perform_request(Elasticsearch::API::HTTP_GET, '_nodes/shutdown')
return unless nodes&.body['nodes'].any?

nodes['nodes'].each do |node|
client.shutdown.delete_node(node['node_id'])
nodes.body['nodes'].each do |node|
client.perform_request(Elasticsearch::API::HTTP_DELETE, "_nodes/#{node['node_id']}/shutdown")
end
end

Expand Down

0 comments on commit e1a4775

Please sign in to comment.