Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dearing committed Jul 27, 2015
1 parent 9ad564c commit ba1b229
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
1 change: 0 additions & 1 deletion libraries/provider_elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class Elasticsearch < Chef::Provider::LWRPBase
service_name = 'elasticsearch'

action :install do

home_dir = "#{new_resource.path}/elasticsearch-#{new_resource.version}"

user new_resource.user
Expand Down
6 changes: 3 additions & 3 deletions test/integration/helpers/serverspec/elasticsearch.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# sshd_service = os[:family] == 'redhat' ? 'sshd' : 'ssh'

shared_examples 'elasticsearch' do
describe command('sv status elasticsearch') do
its(:stdout) { should match /run: elasticsearch/ }
end
describe command('sv status elasticsearch') do
its(:stdout) { should match 'run: elasticsearch' }
end
end

# curl -X GET http://localhost:9200/
Expand Down
7 changes: 2 additions & 5 deletions test/integration/helpers/serverspec/kibana.rb
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# sshd_service = os[:family] == 'redhat' ? 'sshd' : 'ssh'

shared_examples 'kibana' do
describe service('kibana') do
it 'is enabled and running' do
expect(subject).to be_enabled
expect(subject).to be_running
end
describe command('sv status kibana') do
its(:stdout) { should match 'run: kibana' }
end
end
7 changes: 2 additions & 5 deletions test/integration/helpers/serverspec/logstash.rb
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# sshd_service = os[:family] == 'redhat' ? 'sshd' : 'ssh'

shared_examples 'logstash' do
describe service('logstash') do
it 'is enabled and running' do
expect(subject).to be_enabled
expect(subject).to be_running
end
describe command('sv status logstash') do
its(:stdout) { should match 'run: logstash' }
end
end
7 changes: 2 additions & 5 deletions test/integration/helpers/serverspec/logstash_forwarder.rb
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# sshd_service = os[:family] == 'redhat' ? 'sshd' : 'ssh'

shared_examples 'logstash_forwarder' do
describe service('logstash-forwarder') do
it 'is enabled and running' do
expect(subject).to be_enabled
expect(subject).to be_running
end
describe command('sv status logstash-forwarder') do
its(:stdout) { should match 'run: logstash-forwarder' }
end
end

0 comments on commit ba1b229

Please sign in to comment.