Files
cookbook-openstack-compute/spec/_nova_apache_spec.rb
Roger Luethi 7953fbe8c2 Restart apache only where appropriate
The current code tries to restart apache for every change to
/etc/nova/nova.conf even on compute nodes that do not have apache
installed. This changeset splits out the apache service resource into a
separate recipe that (unlike nova-common) is not included by the compute
recipe.

Conflicts: recipes/placement_api.rb
Added version bump.

Change-Id: I87dda61dfabec460fe042b4cee21277382dd9487
(cherry picked from commit 5747451dcb)
2020-08-06 08:31:18 +00:00

23 lines
544 B
Ruby

# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-compute::_nova_apache' do
describe 'ubuntu' do
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
let(:node) { runner.node }
cached(:chef_run) { runner.converge(described_recipe) }
include_context 'compute_stubs'
it do
expect(chef_run).to include_recipe('openstack-compute::nova-common')
end
it do
expect(chef_run.service('apache2')).to \
subscribe_to('template[/etc/nova/nova.conf]').on(:restart)
end
end
end