summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-14 16:05:15 +0000
committerGerrit Code Review <review@openstack.org>2017-06-14 16:05:15 +0000
commitde3bd97fc8b25856a02e9c95f7ab27d4ebed07a5 (patch)
tree2ad9ef3e0f42ce55d3faa6961dc190c0cb77ed68
parentc766efaa24ede395d02d378fc29880df68d333fa (diff)
parent28c4efee3df8eb0e7688631fe74f1d75f162702a (diff)
Merge "Set lowercase for ceph_config values"HEADmaster
-rw-r--r--lib/puppet/type/ceph_config.rb2
-rw-r--r--spec/unit/type/ceph_config_spec.rb10
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/puppet/type/ceph_config.rb b/lib/puppet/type/ceph_config.rb
index 5a44472..6b36d3a 100644
--- a/lib/puppet/type/ceph_config.rb
+++ b/lib/puppet/type/ceph_config.rb
@@ -42,7 +42,7 @@ Puppet::Type.newtype(:ceph_config) do
42 desc 'The value of the setting to be defined.' 42 desc 'The value of the setting to be defined.'
43 munge do |value| 43 munge do |value|
44 value = value.to_s.strip 44 value = value.to_s.strip
45 value.capitalize! if value =~ /^(true|false)$/i 45 value.downcase! if value =~ /^(true|false)$/i
46 value 46 value
47 end 47 end
48 end 48 end
diff --git a/spec/unit/type/ceph_config_spec.rb b/spec/unit/type/ceph_config_spec.rb
index c78dfb6..b51ee8d 100644
--- a/spec/unit/type/ceph_config_spec.rb
+++ b/spec/unit/type/ceph_config_spec.rb
@@ -29,13 +29,13 @@ describe 'Puppet::Type.type(:ceph_config)' do
29 expect(@ceph_config[:value]).to eq('max') 29 expect(@ceph_config[:value]).to eq('max')
30 end 30 end
31 31
32 it 'should convert true to True' do 32 it 'should convert true to true' do
33 @ceph_config[:value] = 'tRuE' 33 @ceph_config[:value] = 'tRuE'
34 expect(@ceph_config[:value]).to eq('True') 34 expect(@ceph_config[:value]).to eq('true')
35 end 35 end
36 36
37 it 'should convert false to False' do 37 it 'should convert false to false' do
38 @ceph_config[:value] = 'fAlSe' 38 @ceph_config[:value] = 'fAlSe'
39 expect(@ceph_config[:value]).to eq('False') 39 expect(@ceph_config[:value]).to eq('false')
40 end 40 end
41end \ No newline at end of file 41end