Fix filter name for puppetdb

When creating the filter class name the last part is not capitalized.
So Swift::Storage::Filter::Healthcheck[bla] is named
Swift::Storage::Filter::healthcheck[bla].  Puppet don't detect the
syntax error as the resource is "created" within a string.  But
puppetdb's parser do not let this work.

This fix it and adjust the tests.

Change-Id: If11c3ad0e98d14b9387b3daa4afeb118387100f8
Closes-Bug: #1252998
This commit is contained in:
Sofer Athlan-Guyot
2013-11-20 03:37:58 -05:00
parent 328a805f1a
commit 3566f9fa65
2 changed files with 4 additions and 4 deletions

View File

@@ -64,7 +64,7 @@ define swift::storage::server(
inline_template(
"<%=
(pipeline - ['${type}-server']).collect do |x|
'Swift::Storage::Filter::' + x + '[${type}]'
'Swift::Storage::Filter::' + x.capitalize + '[${type}]'
end.join(',')
%>"), ',')

View File

@@ -79,10 +79,10 @@ describe 'swift::storage::server' do
end
end
describe "when pipeline is passed an array" do
let :params do req_params.merge({:pipeline => [1,2,3]}) end
let :params do req_params.merge({:pipeline => ['healthcheck','recon','test']}) end
it { should contain_concat__fragment("swift-#{t}-#{title}").with(
:content => /^pipeline\s*=\s*1 2 3\s*$/,
:before => ["Swift::Storage::Filter::1[#{t}]", "Swift::Storage::Filter::2[#{t}]", "Swift::Storage::Filter::3[#{t}]"]
:content => /^pipeline\s*=\s*healthcheck recon test\s*$/,
:before => ["Swift::Storage::Filter::Healthcheck[#{t}]", "Swift::Storage::Filter::Recon[#{t}]", "Swift::Storage::Filter::Test[#{t}]"]
)}
end
describe "when pipeline is not passed an array" do