Merge "Accept string for enabled_notification_handlers"
This commit is contained in:
commit
25d74711b2
|
@ -46,11 +46,11 @@ class designate::sink (
|
||||||
|
|
||||||
if $enabled_notification_handlers {
|
if $enabled_notification_handlers {
|
||||||
designate_config {
|
designate_config {
|
||||||
'service:sink/enabled_notification_handlers': value => join($enabled_notification_handlers,',')
|
'service:sink/enabled_notification_handlers': value => join(any2array($enabled_notification_handlers),',')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
designate_config {
|
designate_config {
|
||||||
'service:sink/enabled_notification_handlers': ensure => absent
|
'service:sink/enabled_notification_handlers': ensure => absent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,27 @@ describe 'designate::sink' do
|
||||||
)
|
)
|
||||||
is_expected.to contain_designate_config('service:sink/enabled_notification_handlers').with_ensure('absent')
|
is_expected.to contain_designate_config('service:sink/enabled_notification_handlers').with_ensure('absent')
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'when using enabled_notification_handlers' do
|
context 'with enabled_notification_handlers (array)' do
|
||||||
before { params.merge!(:enabled_notification_handlers => ['nova_fixed','neutron_floatingip']) }
|
before do
|
||||||
it 'configures designate-sink with enabled_notification_handlers' do
|
params.merge!(
|
||||||
is_expected.to contain_designate_config('service:sink/enabled_notification_handlers').with_value(['nova_fixed,neutron_floatingip'])
|
:enabled_notification_handlers => ['nova_fixed', 'neutron_floatingip']
|
||||||
end
|
)
|
||||||
|
end
|
||||||
|
it 'configures designate-sink with enabled_notification_handlers' do
|
||||||
|
is_expected.to contain_designate_config('service:sink/enabled_notification_handlers').with_value('nova_fixed,neutron_floatingip')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'with enabled_notification_handlers (string)' do
|
||||||
|
before do
|
||||||
|
params.merge!(
|
||||||
|
:enabled_notification_handlers => 'nova_fixed,neutron_floatingip'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
it 'configures designate-sink with enabled_notification_handlers' do
|
||||||
|
is_expected.to contain_designate_config('service:sink/enabled_notification_handlers').with_value('nova_fixed,neutron_floatingip')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue