Test for plugin on standard

This commit is contained in:
Dale McDiarmid 2017-08-15 14:31:56 +01:00
parent 6ebeccfb01
commit 911b2df9ac
5 changed files with 18 additions and 5 deletions

View file

@ -1,6 +1,6 @@
require 'spec_helper'
shared_examples 'standard::init' do |es_version|
shared_examples 'standard::init' do |es_version,plugins|
describe user('elasticsearch') do
it { should exist }
@ -75,5 +75,17 @@ shared_examples 'standard::init' do |es_version|
it { should_not exist }
end
for plugin in plugins
describe file('/usr/share/elasticsearch/plugins/'+plugin) do
it { should be_directory }
it { should be_owned_by 'elasticsearch' }
end
#confirm plugins are installed and the correct version
describe command('curl -s localhost:9200/_nodes/plugins | grep \'"name":"'+plugin+'","version":"'+es_version+'"\'') do
its(:exit_status) { should eq 0 }
end
end
end

View file

@ -2,7 +2,7 @@ require 'standard_spec'
describe 'Standard Tests v 5.x' do
include_examples 'standard::init', "5.2.2"
include_examples 'standard::init', "5.2.2", ["ingest-geoip"]
end