inspec/test/unit/resources/postgres_conf_test.rb
Aaron Lippold 3bb98fa1e8 Fixes the postgres_conf parsing of complex paramerters (#1938)
Fixes #1671

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2017-06-23 08:31:27 -07:00

15 lines
563 B
Ruby

# encoding: utf-8
# author: Aaron Lippold
require 'helper'
describe 'Inspec::Resources::Postgres' do
it 'verify postgresql.conf config parsing of a simple key value' do
resource = load_resource('postgres_conf', '/etc/postgresql/9.4/main/postgresql.conf')
_(resource.params('log_connections')).must_equal 'on'
end
it 'verify postgresql.conf config parsing of a complex key value' do
resource = load_resource('postgres_conf', '/etc/postgresql/9.4/main/postgresql.conf')
_(resource.value(['pgaudit.log_parameter'])).must_equal 'on'
end
end