11
11
it { is_expected . to contain_file ( '/var/lib/postgresql/13/main' ) }
12
12
13
13
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' )
15
15
}
16
16
17
17
it 'validates connection' do
@@ -65,10 +65,10 @@ class { 'postgresql::globals':
65
65
end
66
66
67
67
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" )
72
72
end
73
73
end
74
74
@@ -89,10 +89,10 @@ class { 'postgresql::globals':
89
89
end
90
90
91
91
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" )
96
96
end
97
97
end
98
98
@@ -146,7 +146,7 @@ class { 'postgresql::globals':
146
146
it { is_expected . to contain_class ( 'postgresql::server' ) }
147
147
148
148
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' )
150
150
}
151
151
152
152
it 'validates connection' do
@@ -194,7 +194,7 @@ class { 'postgresql::globals':
194
194
end
195
195
196
196
it 'contains proper initdb exec' do
197
- expect ( subject ) . to contain_exec ( 'postgresql_initdb ' )
197
+ expect ( subject ) . to contain_exec ( 'postgresql_initdb_instance_main ' )
198
198
end
199
199
end
200
200
0 commit comments