1111 it { is_expected . to contain_file ( '/var/lib/postgresql/13/main' ) }
1212
1313 it {
14- expect ( subject ) . to contain_exec ( 'postgresql_reload ' ) . with ( 'command' => 'systemctl reload postgresql' )
14+ expect ( subject ) . to contain_exec ( 'postgresql_reload_main ' ) . with ( 'command' => 'systemctl reload postgresql' )
1515 }
1616
1717 it 'validates connection' do
@@ -65,10 +65,10 @@ class { 'postgresql::globals':
6565 end
6666
6767 it 'sets postgres password' do
68- expect ( subject ) . to contain_exec ( 'set_postgres_postgrespw ' ) . with ( 'command' => '/usr/bin/psql -c "ALTER ROLE \"postgres\" PASSWORD ${NEWPASSWD_ESCAPED}"' ,
69- 'user' => 'postgres' ,
70- 'environment' => [ 'PGPASSWORD=new-p@s$word-to-set' , 'PGPORT=5432' , 'NEWPASSWD_ESCAPED=$$new-p@s$word-to-set$$' ] ,
71- 'unless' => "/usr/bin/psql -h localhost -p 5432 -c 'select 1' > /dev/null" )
68+ expect ( subject ) . to contain_exec ( 'set_postgres_postgrespw_main ' ) . with ( 'command' => '/usr/bin/psql -c "ALTER ROLE \"postgres\" PASSWORD ${NEWPASSWD_ESCAPED}"' ,
69+ 'user' => 'postgres' ,
70+ 'environment' => [ 'PGPASSWORD=new-p@s$word-to-set' , 'PGPORT=5432' , 'NEWPASSWD_ESCAPED=$$new-p@s$word-to-set$$' ] ,
71+ 'unless' => "/usr/bin/psql -h localhost -p 5432 -c 'select 1' > /dev/null" )
7272 end
7373 end
7474
@@ -89,10 +89,10 @@ class { 'postgresql::globals':
8989 end
9090
9191 it 'sets postgres password' do
92- expect ( subject ) . to contain_exec ( 'set_postgres_postgrespw ' ) . with ( 'command' => [ '/usr/bin/psql -c "ALTER ROLE \"postgres\" PASSWORD ${NEWPASSWD_ESCAPED}"' ] ,
93- 'user' => 'postgres' ,
94- 'environment' => [ 'PGPASSWORD=new-p@s$word-to-set' , 'PGPORT=5432' , 'NEWPASSWD_ESCAPED=$$new-p@s$word-to-set$$' ] ,
95- 'unless' => "/usr/bin/psql -h localhost -p 5432 -c 'select 1' > /dev/null" )
92+ expect ( subject ) . to contain_exec ( 'set_postgres_postgrespw_main ' ) . with ( 'command' => [ '/usr/bin/psql -c "ALTER ROLE \"postgres\" PASSWORD ${NEWPASSWD_ESCAPED}"' ] ,
93+ 'user' => 'postgres' ,
94+ 'environment' => [ 'PGPASSWORD=new-p@s$word-to-set' , 'PGPORT=5432' , 'NEWPASSWD_ESCAPED=$$new-p@s$word-to-set$$' ] ,
95+ 'unless' => "/usr/bin/psql -h localhost -p 5432 -c 'select 1' > /dev/null" )
9696 end
9797 end
9898
@@ -146,7 +146,7 @@ class { 'postgresql::globals':
146146 it { is_expected . to contain_class ( 'postgresql::server' ) }
147147
148148 it {
149- expect ( subject ) . to contain_exec ( 'postgresql_reload ' ) . with ( 'command' => '/bin/true' )
149+ expect ( subject ) . to contain_exec ( 'postgresql_reload_main ' ) . with ( 'command' => '/bin/true' )
150150 }
151151
152152 it 'validates connection' do
@@ -194,7 +194,7 @@ class { 'postgresql::globals':
194194 end
195195
196196 it 'contains proper initdb exec' do
197- expect ( subject ) . to contain_exec ( 'postgresql_initdb ' )
197+ expect ( subject ) . to contain_exec ( 'postgresql_initdb_instance_main ' )
198198 end
199199 end
200200
0 commit comments