Skip to content

Instantly share code, notes, and snippets.

@maplebed
Created April 7, 2014 20:41
Show Gist options
  • Save maplebed/10048516 to your computer and use it in GitHub Desktop.
Save maplebed/10048516 to your computer and use it in GitHub Desktop.
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