Merge "Accept a string value for enabled_share_backends"

This commit is contained in:
Zuul 2022-07-15 19:17:04 +00:00 committed by Gerrit Code Review
commit cbac1af980
2 changed files with 14 additions and 2 deletions

View File

@ -18,7 +18,7 @@ class manila::backends (
# Maybe this could be extended to dynamically find the enabled names
manila_config {
'DEFAULT/enabled_share_backends': value => join($enabled_share_backends, ',');
'DEFAULT/enabled_share_backends': value => join(any2array($enabled_share_backends), ',');
}
}

View File

@ -36,7 +36,19 @@ describe 'manila::backends' do
default_params.merge(params)
end
context 'configure manila with default parameters' do
context 'with enabled_share_backends set by string' do
before :each do
params.merge!(
:enabled_share_backends => 'lowcost,regular,premium'
)
end
it 'configures manila.conf with default params' do
is_expected.to contain_manila_config('DEFAULT/enabled_share_backends').with_value(p[:enabled_share_backends])
end
end
context 'with enabled_share_backends set by array' do
before :each do
params.merge!(
:enabled_share_backends => ['lowcost', 'regular', 'premium']