80c85e8f2b
This patch ports all of the existing system tests to use rspec-system instead. To assist with this conversion some patches were made to fix OS compatibility where necessary. We also added an ensure parameter to the postgresql::server class to assist with removing PostgreSQL configuration to aid with testing cleanups. The documentation has been updated to indicate test usage with rspec-system, we've also renamed the 'tests' directory to 'examples'. Signed-off-by: Ken Barber <ken@bob.sh>
22 lines
641 B
Puppet
22 lines
641 B
Puppet
class { 'postgresql::server':
|
|
config_hash => {
|
|
'ip_mask_deny_postgres_user' => '0.0.0.0/32',
|
|
'ip_mask_allow_all_users' => '0.0.0.0/0',
|
|
'listen_addresses' => '*',
|
|
'manage_redhat_firewall' => true,
|
|
'postgres_password' => 'postgres',
|
|
},
|
|
}
|
|
|
|
postgresql::database{ ['test1', 'test2', 'test3']:
|
|
# TODO: ensure not yet supported
|
|
#ensure => present,
|
|
charset => 'utf8',
|
|
require => Class['postgresql::server'],
|
|
}
|
|
postgresql::database{ 'test4':
|
|
# TODO: ensure not yet supported
|
|
#ensure => present,
|
|
charset => 'latin1',
|
|
require => Class['postgresql::server'],
|
|
}
|