x-pack test cleanup

This commit is contained in:
Dale McDiarmid 2017-01-11 13:05:13 +00:00
parent 197cf05a0e
commit b2dd44e9d5

View file

@ -78,7 +78,7 @@ shared_examples 'xpack::init' do |es_version|
end end
#Check security,watcher and license plugins are installed #Check x-pack and license plugins are installed
describe file('/usr/share/elasticsearch/plugins/license') do describe file('/usr/share/elasticsearch/plugins/license') do
it { should be_directory } it { should be_directory }
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
@ -97,29 +97,25 @@ shared_examples 'xpack::init' do |es_version|
end end
end end
describe file('/usr/share/elasticsearch/plugins/security') do describe file('/usr/share/elasticsearch/plugins/x-pack') do
it { should be_directory } it { should be_directory }
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
end end
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true -u es_admin:changeMe | grep security') do describe command('curl -s localhost:9200/_nodes/plugins?pretty=true -u es_admin:changeMe | grep x-pack') do
its(:exit_status) { should eq 0 } its(:exit_status) { should eq 0 }
end end
describe file('/etc/elasticsearch/security_node/security') do describe file('/etc/elasticsearch/security_node/x-pack') do
it { should be_directory } it { should be_directory }
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
end end
describe file('/usr/share/elasticsearch/plugins/watcher') do describe file('/usr/share/elasticsearch/plugins/x-pack') do
it { should be_directory } it { should be_directory }
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
end end
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true -u es_admin:changeMe | grep watcher') do
its(:exit_status) { should eq 0 }
end
describe file('/usr/share/elasticsearch/plugins/kopf') do describe file('/usr/share/elasticsearch/plugins/kopf') do
it { should be_directory } it { should be_directory }
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
@ -129,24 +125,6 @@ shared_examples 'xpack::init' do |es_version|
its(:exit_status) { should eq 0 } its(:exit_status) { should eq 0 }
end end
#test we haven't installed graph or marvel-agent
describe file('/usr/share/elasticsearch/plugins/graph') do
it { should_not exist }
end
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true -u es_admin:changeMe | grep graph') do
its(:exit_status) { should eq 1 }
end
describe file('/usr/share/elasticsearch/plugins/marvel-agent') do
it { should_not exist }
end
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true -u es_admin:changeMe | grep marvel-agent') do
its(:exit_status) { should eq 1 }
end
#Test users file, users_roles and roles.yml #Test users file, users_roles and roles.yml
describe file('/etc/elasticsearch/security_node/x-pack/users_roles') do describe file('/etc/elasticsearch/security_node/x-pack/users_roles') do