Merge "fixed plugin_template notifications for neutron-server service resource"

This commit is contained in:
Jenkins 2016-04-28 14:54:08 +00:00 committed by Gerrit Code Review
commit 0e9af30bd1
2 changed files with 15 additions and 2 deletions

View File

@ -93,7 +93,7 @@ end
include_recipe 'openstack-network::db_migration'
plugin_templates = []
node['openstack']['network']['plugins'].each_value do |plugin|
plugin_templates << "template[#{File.join(plugin['path'], plugin['filename'])}"
plugin_templates << "template[#{File.join(plugin['path'], plugin['filename'])}]"
end
service 'neutron-server' do
@ -104,7 +104,7 @@ service 'neutron-server' do
plugin_templates,
'template[/etc/neutron/neutron.conf]',
'remote_file[/etc/neutron/policy.json]'
]
].flatten
end
include_recipe 'openstack-network::identity_registration'

View File

@ -37,6 +37,19 @@ describe 'openstack-network::server' do
expect(chef_run).to start_service 'neutron-server'
end
let(:neutron_service) { chef_run.service('neutron-server') }
it do
expect(neutron_service)
.to subscribe_to('template[/etc/neutron/neutron.conf]').on(:restart).delayed
end
it do
node.set['openstack']['network']['policyfile_url'] = 'http://www.someurl.com'
expect(neutron_service)
.to subscribe_to('remote_file[/etc/neutron/policy.json]').on(:restart).delayed
end
it 'allows overriding service names' do
node.set['openstack']['network']['platform']['neutron_server_service'] = 'my-neutron-server'