Multi node plugin tests
This commit is contained in:
parent
50f1c6f153
commit
54dd51b8a1
9 changed files with 62 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
shared_examples 'multi::init' do |es_version|
|
||||
shared_examples 'multi::init' do |es_version,plugins|
|
||||
|
||||
describe user('elasticsearch') do
|
||||
it { should exist }
|
||||
|
|
@ -171,8 +171,42 @@ shared_examples 'multi::init' do |es_version|
|
|||
end
|
||||
end
|
||||
|
||||
#Multi node plugin tests
|
||||
describe file('/opt/elasticsearch/plugins/node1') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
#Test server spec file has been created and modified
|
||||
describe file('/opt/elasticsearch/plugins/master') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
|
||||
for plugin in plugins
|
||||
describe file('/opt/elasticsearch/plugins/node1/'+plugin) do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe file('/opt/elasticsearch/plugins/master/'+plugin) do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true | grep '+plugin) do
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
||||
describe command('curl -s localhost:9201/_nodes/plugins?pretty=true | grep '+plugin) do
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
#Test server spec file has been created and modified - currently not possible as not copied for debian 8
|
||||
#describe file('/usr/lib/systemd/system/master_elasticsearch.service') do
|
||||
# it { should be_file }
|
||||
# it { should contain 'LimitMEMLOCK=infinity' }
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ shared_examples 'package::init' do |es_version,plugins|
|
|||
|
||||
describe file('/etc/elasticsearch/node1/elasticsearch.yml') do
|
||||
it { should be_file }
|
||||
it { should contain 'path.plugins: /usr/share/elasticsearch/plugins/node1' }
|
||||
it { should contain 'http.port: 9200' }
|
||||
it { should contain 'transport.tcp.port: 9300' }
|
||||
it { should contain 'discovery.zen.ping.unicast.hosts: localhost:9300' }
|
||||
end
|
||||
|
||||
describe file('/etc/elasticsearch/node1/scripts') do
|
||||
|
|
@ -77,10 +81,7 @@ shared_examples 'package::init' do |es_version,plugins|
|
|||
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true | grep '+plugin) do
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#path.plugins: /usr/share/elasticsearch/plugins/node1
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue