Set lowercase for ceph_config values
Capitalized values of True and False are conflicting with systemd scripts This commit set all values to lowercase Fixes: Bug #1697476 Change-Id: Ibd01a7a850e7593fabd676b8b0c0af2b77101a2a
This commit is contained in:
parent
55ae425b19
commit
28c4efee3d
@ -42,7 +42,7 @@ Puppet::Type.newtype(:ceph_config) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
value = value.to_s.strip
|
||||
value.capitalize! if value =~ /^(true|false)$/i
|
||||
value.downcase! if value =~ /^(true|false)$/i
|
||||
value
|
||||
end
|
||||
end
|
||||
|
@ -29,13 +29,13 @@ describe 'Puppet::Type.type(:ceph_config)' do
|
||||
expect(@ceph_config[:value]).to eq('max')
|
||||
end
|
||||
|
||||
it 'should convert true to True' do
|
||||
it 'should convert true to true' do
|
||||
@ceph_config[:value] = 'tRuE'
|
||||
expect(@ceph_config[:value]).to eq('True')
|
||||
expect(@ceph_config[:value]).to eq('true')
|
||||
end
|
||||
|
||||
it 'should convert false to False' do
|
||||
it 'should convert false to false' do
|
||||
@ceph_config[:value] = 'fAlSe'
|
||||
expect(@ceph_config[:value]).to eq('False')
|
||||
expect(@ceph_config[:value]).to eq('false')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user