Skip to content

Commit 7b08097

Browse files
cprice404kbrezina
authored andcommitted
WIP
1 parent 6e4ea18 commit 7b08097

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

spec/support/shared_examples/system_default_postgres.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,19 @@ def install_postgres
150150
sudo_psql_and_expect_result(vm, '--command="select ts.spcname from pg_database db, pg_tablespace ts where db.dattablespace = ts.oid and db.datname = \'"\'tablespacedb3\'"\'"', 'tablespace2')
151151
end
152152
end
153+
154+
describe 'postgresql.conf include' do
155+
it "should support an 'include' directive at the end of postgresql.conf" do
156+
test_class = 'class {"postgresql_tests::system_default::test_pgconf_include": }'
157+
158+
# Run once to check for crashes
159+
sudo_and_log(vm, "puppet apply -e '#{test_class}'")
160+
161+
# Run again to check for idempotence
162+
sudo_and_log(vm, "puppet apply --detailed-exitcodes -e '#{test_class}'")
163+
164+
# Check that the user can create a table in the database
165+
sudo_psql_and_log(vm, '--command="SELECT 1" --port=5433')
166+
end
167+
end
153168
end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class postgresql_tests::system_default::test_pgconf_include {
2+
3+
$pg_conf_include_file = '/tmp/postgresql_conf_extras.conf'
4+
5+
file { $pg_conf_include_file :
6+
content => 'port = 5433'
7+
} ->
8+
9+
class { 'postgresql::server':
10+
config_hash => {
11+
'include' => '/tmp/postgresql_conf_extras.conf'
12+
}
13+
}
14+
15+
}

0 commit comments

Comments
 (0)