api-spec-testing/test_file.rb
# Prepare Elasticsearch for a single test file.
# This method deletes indices, roles, datafeeds, etc.
#
# @since 6.2.0
Prepare Elasticsearch for a single test file.
This method deletes indices, roles, datafeeds, etc.
Prepare Elasticsearch for a single test file . This method deletes indices roles datafeeds etc .
def clear_datafeeds(client)
          client.xpack.ml.stop_datafeed(datafeed_id: '_all', force: true)
          client.xpack.ml.get_datafeeds['datafeeds'].each do |d|
            client.xpack.ml.delete_datafeed(datafeed_id: d['datafeed_id'])
          end
        end
def clear_datafeeds ( client ) client . xpack . ml . stop_datafeed ( datafeed_id : '_all' , force : true ) client . xpack . ml . get_datafeeds [ 'datafeeds' ] . each do | d | client . xpack . ml . delete_datafeed ( datafeed_id : d [ 'datafeed_id' ] ) end end
Prepare Elasticsearch for a single test file.
Prepare Elasticsearch for a single test file .
client
since
None