inspec/test/unit/resources/limits_conf_test.rb
Sonu Saha eac4e11b34 CFINSPEC-267: Add resource_id & unit test: limits_conf
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-06-02 11:50:49 +05:30

12 lines
425 B
Ruby

require "helper"
require "inspec/resource"
require "inspec/resources/limits_conf"
describe "Inspec::Resources::LimitsConf" do
it "verify limits.conf config parsing" do
resource = load_resource("limits_conf")
_(resource.send("*")).must_equal [%w{soft core 0}, %w{hard rss 10000}]
_(resource.send("ftp")).must_equal [%w{hard nproc 0}]
_(resource.resource_id).must_equal "/etc/security/limits.conf"
end
end