Only change name to x-pack-core for 6.2 and above

This commit is contained in:
Michael Russell 2018-02-22 11:14:25 +01:00
parent d9d54917bd
commit 38982ba6ad
No known key found for this signature in database
GPG key ID: A90C1696496085FE

View file

@ -125,8 +125,15 @@ shared_examples 'xpack_standard::init' do |vars|
plugins = curl_json('http://localhost:9200/_nodes/plugins')
node, data = plugins['nodes'].first
version = 'plugin not found'
if Gem::Version.new(vars['es_version']) >= Gem::Version.new('6.2')
name = 'x-pack-core'
else
name = 'x-pack'
end
data['plugins'].each do |plugin|
if plugin['name'] == 'x-pack-core'
if plugin['name'] == name
version = plugin['version']
end
end