2019-06-11 22:24:35 +00:00
|
|
|
require "helper"
|
|
|
|
require "inspec/resource"
|
|
|
|
require "inspec/resources/postgres_conf"
|
2017-06-23 15:31:27 +00:00
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
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"
|
2017-06-23 15:31:27 +00:00
|
|
|
end
|
2019-06-11 22:24:35 +00:00
|
|
|
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"
|
2017-06-23 15:31:27 +00:00
|
|
|
end
|
|
|
|
end
|