diff --git a/recipes/compute.rb b/recipes/compute.rb index 507ac1ab..f15d5a95 100644 --- a/recipes/compute.rb +++ b/recipes/compute.rb @@ -59,7 +59,7 @@ service "nova-compute" do supports :status => true, :restart => true subscribes :restart, resources("template[/etc/nova/nova.conf]") - action :enable + action [:enable, :start] end include_recipe "openstack-compute::libvirt" diff --git a/spec/compute-redhat_spec.rb b/spec/compute-redhat_spec.rb index 855946f5..0fa68461 100644 --- a/spec/compute-redhat_spec.rb +++ b/spec/compute-redhat_spec.rb @@ -32,5 +32,9 @@ describe "openstack-compute::compute" do expected = "openstack-nova-compute" expect(@chef_run).to set_service_to_start_on_boot expected end + + it "starts nova compute" do + expect(@chef_run).to start_service "openstack-nova-compute" + end end end diff --git a/spec/compute_spec.rb b/spec/compute_spec.rb index f9e6f2b2..bce033f5 100644 --- a/spec/compute_spec.rb +++ b/spec/compute_spec.rb @@ -60,6 +60,10 @@ describe "openstack-compute::compute" do expect(@chef_run).to set_service_to_start_on_boot "nova-compute" end + it "starts nova compute" do + expect(@chef_run).to start_service "nova-compute" + end + it "runs libvirt recipe" do expect(@chef_run).to include_recipe "openstack-compute::libvirt" end