Skip to content

Commit ed29a99

Browse files
committed
RSpec tests were fixed to work properly with included postgresql_puppet_extras.conf
1 parent a4ec366 commit ed29a99

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

spec/support/shared_examples/system_default_postgres.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ def install_postgres
161161
# Run again to check for idempotence
162162
sudo_and_log(vm, "puppet apply --detailed-exitcodes -e '#{test_class}'")
163163

164+
sudo_and_log(vm, "service #{service_name} restart")
165+
164166
# Check that the user can create a table in the database
165-
sudo_psql_and_log(vm, '--command="show max_connections" -t', 'postgres', ' |grep "1234"')
167+
sudo_psql_and_log(vm, '--command="show max_connections" -t', 'postgres', ' |grep "123"')
166168

167169
cleanup_class = 'class {"postgresql_tests::system_default::test_pgconf_include_cleanup": }'
168170
sudo_and_log(vm, "puppet apply -e '#{cleanup_class}'")

spec/test_module/manifests/system_default/test_pgconf_include.pp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
require postgresql::params
44

5-
$pg_conf_include_file = "${postgresql::params::confdir}/postgresql_conf_extras.conf"
5+
$pg_conf_include_file = "${postgresql::params::confdir}/postgresql_puppet_extras.conf"
66

77
file { $pg_conf_include_file :
8-
content => 'max_connections = 1234'
8+
content => 'max_connections = 123'
99
}
10-
1110
}

spec/test_module/manifests/system_default/test_pgconf_include_cleanup.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require postgresql::params
44

5-
$pg_conf_include_file = "${postgresql::params::confdir}/postgresql_conf_extras.conf"
5+
$pg_conf_include_file = "${postgresql::params::confdir}/postgresql_puppet_extras.conf"
66

77
file { $pg_conf_include_file :
88
ensure => absent

0 commit comments

Comments
 (0)