Update quoting because addresses are not floats
This commit is contained in:
parent
8464e33222
commit
f6dd7ca482
2 changed files with 6 additions and 1 deletions
|
@ -23,7 +23,7 @@ Puppet::Type.type(:postgresql_conf).provide(
|
||||||
else
|
else
|
||||||
val = h[:value]
|
val = h[:value]
|
||||||
end
|
end
|
||||||
dontneedquote = val.match(/^([\d\.]+|\w+)$/)
|
dontneedquote = val.match(/^(\d+.?\d+|\w+)$/)
|
||||||
dontneedequal = h[:name].match(/^(include|include_if_exists)$/i)
|
dontneedequal = h[:name].match(/^(include|include_if_exists)$/i)
|
||||||
|
|
||||||
str = h[:name].downcase # normalize case
|
str = h[:name].downcase # normalize case
|
||||||
|
|
|
@ -137,6 +137,11 @@ describe provider_class do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "quotes addresses" do
|
||||||
|
expect(provider.to_line( {:name=>"listen_addresses", :value=>"0.0.0.0", :comment=>nil, :record_type=>:parsed })).to eq(
|
||||||
|
"listen_addresses = '0.0.0.0'"
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue