|
279 | 279 | impact 1.0 |
280 | 280 | title 'Enable logging functions' |
281 | 281 | desc 'Logging functions must be turned on and properly configured according / compliant to local law.' |
282 | | - describe postgres_conf(POSTGRES_CONF_PATH) do |
283 | | - its('logging_collector') { should eq 'on' } |
284 | | - its('log_connections') { should eq 'on' } |
285 | | - its('log_disconnections') { should eq 'on' } |
286 | | - its('log_duration') { should eq 'on' } |
287 | | - its('log_hostname') { should eq 'on' } |
288 | | - its('log_directory') { should_not eq ' ' } |
289 | | - its('log_line_prefix') { should eq '%t %u %d %h' } |
| 282 | + describe postgres_session(USER, PASSWORD).query('SHOW logging_collector;') do |
| 283 | + its('output') { should eq 'on' } |
| 284 | + end |
| 285 | + describe postgres_session(USER, PASSWORD).query('SHOW log_connections;') do |
| 286 | + its('output') { should eq 'on' } |
| 287 | + end |
| 288 | + describe postgres_session(USER, PASSWORD).query('SHOW log_disconnections;') do |
| 289 | + its('output') { should eq 'on' } |
| 290 | + end |
| 291 | + describe postgres_session(USER, PASSWORD).query('SHOW log_duration;') do |
| 292 | + its('output') { should eq 'on' } |
| 293 | + end |
| 294 | + describe postgres_session(USER, PASSWORD).query('SHOW log_hostname;') do |
| 295 | + its('output') { should eq 'on' } |
| 296 | + end |
| 297 | + describe postgres_session(USER, PASSWORD).query('SHOW log_directory;') do |
| 298 | + its('output') { should eq 'on' } |
| 299 | + end |
| 300 | + describe postgres_session(USER, PASSWORD).query('SHOW log_line_prefix;') do |
| 301 | + its('output') { should eq 'on' } |
290 | 302 | end |
291 | 303 | end |
292 | 304 |
|
|
0 commit comments