2014-01-21 22:11:25 +00:00
|
|
|
require_relative '../spec_helper'
|
|
|
|
|
|
|
|
describe 'main::head_node' do
|
|
|
|
let(:chef_run) do
|
|
|
|
ChefSpec::Runner.new do |node|
|
|
|
|
node.set["main"] = {
|
|
|
|
head_node: {
|
|
|
|
internal_ip: "10.10.1.1",
|
|
|
|
internal_network_device: "10.10.1.1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end.converge(described_recipe)
|
|
|
|
end
|
|
|
|
it "should include cookbooks" do
|
2014-01-22 09:31:55 +00:00
|
|
|
chef_run.should include_recipe('ntp')
|
|
|
|
chef_run.should include_recipe('bind')
|
|
|
|
chef_run.should include_recipe('dhcp')
|
2014-01-21 22:11:25 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'main::compute_node' do
|
|
|
|
let(:chef_run) do
|
|
|
|
ChefSpec::Runner.new do |node|
|
|
|
|
end.converge(described_recipe)
|
|
|
|
end
|
|
|
|
it "should include cookbooks" do
|
2014-01-22 09:31:55 +00:00
|
|
|
chef_run.should include_recipe('apt')
|
|
|
|
chef_run.should include_recipe('ntp')
|
2014-01-21 22:11:25 +00:00
|
|
|
end
|
|
|
|
end
|