-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update testing for env vars and api checks
- Loading branch information
Showing
2 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters