Fixes issue 70, Improves plugin management, Refactoring, Updates tests, Introduces multiple data dir support

This commit is contained in:
Dale McDiarmid 2016-03-18 19:30:11 +00:00
parent 40fd3516c4
commit 0fd1f34852
16 changed files with 216 additions and 49 deletions

View file

@ -29,7 +29,7 @@ shared_examples 'multi::init' do |es_version,plugins|
it { should contain 'node.name: localhost-node1' }
it { should_not contain 'bootstrap.mlockall: true' }
it { should contain 'path.conf: /etc/elasticsearch/node1' }
it { should contain 'path.data: /var/lib/elasticsearch/localhost-node1' }
it { should contain 'path.data: /opt/elasticsearch/data-1/localhost-node1,/opt/elasticsearch/data-2/localhost-node1' }
it { should contain 'path.work: /tmp/elasticsearch/localhost-node1' }
it { should contain 'path.logs: /var/log/elasticsearch/localhost-node1' }
end
@ -46,7 +46,7 @@ shared_examples 'multi::init' do |es_version,plugins|
it { should contain 'node.name: localhost-master' }
it { should contain 'bootstrap.mlockall: true' }
it { should contain 'path.conf: /etc/elasticsearch/master' }
it { should contain 'path.data: /opt/elasticsearch/localhost-master' }
it { should contain 'path.data: /opt/elasticsearch/master/localhost-master' }
it { should contain 'path.work: /tmp/elasticsearch/localhost-master' }
it { should contain 'path.logs: /var/log/elasticsearch/localhost-master' }
end
@ -129,16 +129,18 @@ shared_examples 'multi::init' do |es_version,plugins|
end
#Confirm that the data directory has only been set for the first node
describe file('/opt/elasticsearch/localhost-master') do
describe file('/opt/elasticsearch/master/localhost-master') do
it { should be_directory }
it { should be_owned_by 'elasticsearch' }
end
describe file('/opt/elasticsearch/localhost-node1') do
it { should_not exist }
describe file('/opt/elasticsearch/data-1/localhost-node1') do
it { should be_directory }
it { should be_owned_by 'elasticsearch' }
end
describe file('/var/lib/elasticsearch/localhost-node1') do
describe file('/opt/elasticsearch/data-2/localhost-node1') do
it { should be_directory }
it { should be_owned_by 'elasticsearch' }
end
@ -203,6 +205,25 @@ shared_examples 'multi::init' do |es_version,plugins|
end
end
describe file('/etc/init.d/elasticsearch') do
it { should_not exist }
end
describe file('/etc/default/elasticsearch') do
it { should_not exist }
end
describe file('/etc/sysconfig/elasticsearch') do
it { should_not exist }
end
describe file('/usr/lib/systemd/system/elasticsearch.service') do
it { should_not exist }
end
describe file('/etc/elasticsearch/elasticsearch.yml') do
it { should_not exist }
end