diff --git a/test/integration/helpers/serverspec/elasticsearch.rb b/test/integration/helpers/serverspec/elasticsearch.rb index 6f8af97..ae9fbff 100644 --- a/test/integration/helpers/serverspec/elasticsearch.rb +++ b/test/integration/helpers/serverspec/elasticsearch.rb @@ -1,10 +1,21 @@ # sshd_service = os[:family] == 'redhat' ? 'sshd' : 'ssh' shared_examples 'elasticsearch' do + describe command('sv status elasticsearch') do its(:stdout) { should match 'run: elasticsearch' } end -end -# curl -X GET http://localhost:9200/ -# curl 'localhost:9200/_cat/health?v' + describe command('curl http://localhost:9200/') do + its(:stdout) { should match '"status" : 200,' } + end + + describe command('curl http://localhost:9200/_cat/health?v') do + its(:stdout) { should match 'elasticsearch' } + end + + describe file('/etc/service/elasticsearch/env/ES_USER') do + it { should be_file } + its(:content) { should match 'elasticsearch' } + end +end diff --git a/test/integration/helpers/serverspec/logstash.rb b/test/integration/helpers/serverspec/logstash.rb index 5a84fff..589dc41 100644 --- a/test/integration/helpers/serverspec/logstash.rb +++ b/test/integration/helpers/serverspec/logstash.rb @@ -4,4 +4,8 @@ describe command('sv status logstash') do its(:stdout) { should match 'run: logstash' } end + describe file('/etc/service/logstash/env/LS_USER') do + it { should be_file } + its(:content) { should match 'logstash' } + end end