Add tests

The test sets an ip address, uses language to indicate it should end up
in quotes.
This commit is contained in:
Reid Vandewiele 2013-10-26 18:24:42 -07:00
parent 0573c158a2
commit a99ad69f3e

View file

@ -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