elasticsearch-xpack/spec/support/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_roles(client)
          client.xpack.security.get_role.each do |role, _|
            begin; client.xpack.security.delete_role(name: role); rescue; end
          end
        end
def clear_roles ( client ) client . xpack . security . get_role . each do | role , _ | begin ; client . xpack . security . delete_role ( name : role ) ; rescue ; end end end
Prepare Elasticsearch for a single test file.
Prepare Elasticsearch for a single test file .
client
since
None