Support for configuration per node and multiple nodes per server
This commit is contained in:
parent
0c6f326bed
commit
d19297adda
30 changed files with 818 additions and 88 deletions
42
test/integration/config/serverspec/default_spec.rb
Normal file
42
test/integration/config/serverspec/default_spec.rb
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
require 'spec_helper'
|
||||
|
||||
context "basic tests" do
|
||||
|
||||
describe user('elasticsearch') do
|
||||
it { should exist }
|
||||
end
|
||||
|
||||
describe service('node1_elasticsearch') do
|
||||
it { should be_running }
|
||||
end
|
||||
|
||||
describe package('elasticsearch') do
|
||||
it { should be_installed }
|
||||
end
|
||||
|
||||
describe file('/etc/elasticsearch/node1_elasticsearch/elasticsearch.yml') do
|
||||
it { should be_file }
|
||||
end
|
||||
|
||||
#test configuration parameters have been set - test all appropriately set in config file
|
||||
describe file('/etc/elasticsearch/node1_elasticsearch/elasticsearch.yml') do
|
||||
it { should contain 'http.port: 9201' }
|
||||
it { should contain 'transport.tcp.port: 9301' }
|
||||
it { should contain 'node.data: false' }
|
||||
it { should contain 'node.master: true' }
|
||||
it { should contain 'discovery.zen.ping.multicast.enabled: false' }
|
||||
it { should contain 'cluster.name: custom-cluster' }
|
||||
it { should contain 'node.name: node1_localhost' }
|
||||
it { should contain 'discovery.zen.ping.unicast.hosts: localhost:9301' }
|
||||
end
|
||||
|
||||
#test we started on the correct port was used
|
||||
describe command('curl "localhost:9201" | grep status') do
|
||||
#TODO: This is returning an empty string
|
||||
#its(:stdout) { should match /\"status\" : 200/ }
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue