From 38982ba6ad0bb20342c00c694cc6f872b2fa6d1c Mon Sep 17 00:00:00 2001 From: Michael Russell Date: Thu, 22 Feb 2018 11:14:25 +0100 Subject: [PATCH] Only change name to x-pack-core for 6.2 and above --- .../helpers/serverspec/xpack_standard_spec.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/integration/helpers/serverspec/xpack_standard_spec.rb b/test/integration/helpers/serverspec/xpack_standard_spec.rb index f6f156c..545fbbc 100644 --- a/test/integration/helpers/serverspec/xpack_standard_spec.rb +++ b/test/integration/helpers/serverspec/xpack_standard_spec.rb @@ -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