Merge "fixed plugin_template notifications for neutron-server service resource"
This commit is contained in:
commit
0e9af30bd1
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in New Issue