-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Beef up chef-solo testing and guards
- Add additional guards for chef-solo before calling elasticsearch::search_discovery - Ensure node.deep_fetch is used when getting unicast hosts, handle empty / not found case - RE: #141.
- Loading branch information
Showing
6 changed files
with
37 additions
and
13 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Encoding: utf-8 | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe 'elkstack::default' do | ||
let(:chef_run) do | ||
stub_command("curl -sI http://eslocal:9200/_snapshot/elkstack | grep -q \"404 Not Found\"").and_return(0) | ||
ChefSpec::SoloRunner.new(platform: 'redhat', version: '6.5') do |node| | ||
node.set['cpu']['total'] = 8 | ||
node.set['memory']['total'] = 4096 | ||
node.set['public_info']['remote_ip'] = '127.0.0.1' | ||
node.set['chef_environment'] = '_default' # be a dummy env for htpasswd.curl | ||
node.set['rackspace']['cloud_credentials']['username'] = 'joe-test' | ||
node.set['rackspace']['cloud_credentials']['api_key'] = '123abc' | ||
node.set['filesystem'] = [] | ||
end.converge(described_recipe) | ||
# converge WITH platformstack so we can test our templates are created | ||
end | ||
|
||
it 'installs ruby' do | ||
expect(chef_run).to install_package('ruby') | ||
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