Created
April 7, 2014 20:41
-
-
Save maplebed/10048516 to your computer and use it in GitHub Desktop.
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
context "unicast mode with host_cluster that doesn't exist in clusterport and no default cluster" do | |
let(:chef_run) do | |
runner = ChefSpec::Runner.new( | |
platform: 'ubuntu', | |
version: '12.04' | |
) | |
runner.node.set['ganglia']['unicast'] = true | |
runner.node.set['ganglia']['host_cluster'] = { | |
"default" => 0, | |
"not_in_clusterport" => 1 | |
} | |
runner.node.delete(runner.node['ganglia']['clusterport']['default']) | |
runner.converge(described_recipe) | |
end | |
it 'writes the gmond.conf, defaulting to the default cluster' do | |
expect(chef_run).to create_template('/etc/ganglia/gmond.conf').with( | |
variables: { | |
:cluster_name=>"default", | |
:gmond_collectors=>["127.0.0.1"], | |
:ports=>[18649], | |
:spoof_hostname=>false, | |
:hostname=>"Fauxhai" | |
} | |
) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment