Add tests
The test sets an ip address, uses language to indicate it should end up in quotes.
This commit is contained in:
parent
0573c158a2
commit
a99ad69f3e
1 changed files with 18 additions and 0 deletions
|
@ -23,4 +23,22 @@ describe 'postgresql::server::config_entry:', :unless => UNSUPPORTED_PLATFORMS.i
|
|||
expect(r.stderr).to eq('')
|
||||
end
|
||||
end
|
||||
|
||||
it 'should correctly set a quotes-required string' do
|
||||
pp = <<-EOS.unindent
|
||||
class { 'postgresql::server': }
|
||||
|
||||
postgresql::server::config_entry { 'listen_addresses':
|
||||
value => '0.0.0.0',
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :catch_failures => true)
|
||||
|
||||
psql('--command="show all" postgres') do |r|
|
||||
r.stdout.should =~ /listen_adresses.+0\.0\.0\.0/
|
||||
r.stderr.should be_empty
|
||||
r.exit_code.should == 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue