chef-lctp/spec/coobooks/main_spec.rb

31 lines
742 B
Ruby

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
chef_run.should include_recipe('ntp')
chef_run.should include_recipe('bind')
chef_run.should include_recipe('dhcp')
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
chef_run.should include_recipe('apt')
chef_run.should include_recipe('ntp')
end
end