inspec/test/unit/resources/cgroup_test.rb
Sonu Saha c5a66f58a6 CFINSPEC-73: Initial draft of cgroup resource
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2022-03-23 07:54:11 +05:30

18 lines
653 B
Ruby

# If we can load the InSpec globals definition file...
require "inspec/globals"
# ... we can find the core test unit helper file
require "#{Inspec.src_root}/test/helper"
# Load (require) the resource library file
require_relative "../../../lib/inspec/resources/cgroup"
describe Inspec::Resources::Cgroup do
it "works correctly with the constructor on the platform" do
# Add contructor arguments to load_resource if needed
resource = MockLoader.new("linux".to_sym).load_resource("cgroup")
_(resource.has_bells?).must_equal true
_(resource.shoe_size).must_equal 42
_(resource.resource_id).must_equal "something special"
end
end