Skip to content

Commit 082da52

Browse files
committed
[API] Test Runner: Deletes data frame analytics on wipe cluster
1 parent c7379d1 commit 082da52

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def wipe_cluster(client)
7373
if platinum?
7474
clear_ml_jobs(client)
7575
clear_datafeeds(client)
76+
delete_data_frame_analytics(client)
7677
end
7778
delete_all_ilm_policies(client) if @has_ilm
7879
delete_all_follow_patterns(client) if @has_ccr
@@ -387,6 +388,14 @@ def delete_all_node_shutdown_metadata(client)
387388
client.shutdown.delete_node(node['node_id'])
388389
end
389390
end
391+
392+
def delete_data_frame_analytics(client)
393+
dfs = client.ml.get_data_frame_analytics
394+
395+
dfs['data_frame_analytics'].each do |df|
396+
client.ml.delete_data_frame_analytics(id: df['id'], force: true)
397+
end
398+
end
390399
end
391400
end
392401
end

0 commit comments

Comments
 (0)