Removed aws resource requiring from test/helper and inspec/resource.

This speeds up parallel unit test runs from a very consistent 2:49 to
a very consistent 1:53, or a 33% reduction.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2019-05-20 17:19:38 -07:00
parent 15c770183f
commit adaf2bc364
165 changed files with 199 additions and 125 deletions

View file

@ -142,7 +142,7 @@ require 'inspec/resources/kernel_parameter'
require 'inspec/resources/key_rsa'
require 'inspec/resources/ksh'
require 'inspec/resources/limits_conf'
require 'inspec/resources/login_def'
require 'inspec/resources/login_defs'
require 'inspec/resources/mount'
require 'inspec/resources/mssql_session'
require 'inspec/resources/mysql'
@ -170,13 +170,13 @@ require 'inspec/resources/postgres_ident_conf'
require 'inspec/resources/postgres_session'
require 'inspec/resources/powershell'
require 'inspec/resources/processes'
require 'inspec/resources/rabbitmq_conf'
require 'inspec/resources/rabbitmq_config'
require 'inspec/resources/registry_key'
require 'inspec/resources/security_identifier'
require 'inspec/resources/security_policy'
require 'inspec/resources/service'
require 'inspec/resources/shadow'
require 'inspec/resources/ssh_conf'
require 'inspec/resources/ssh_config'
require 'inspec/resources/ssl'
require 'inspec/resources/sys_info'
require 'inspec/resources/toml'
@ -188,7 +188,7 @@ require 'inspec/resources/windows_hotfix'
require 'inspec/resources/windows_task'
require 'inspec/resources/wmi'
require 'inspec/resources/x509_certificate'
require 'inspec/resources/xinetd'
require 'inspec/resources/xinetd_conf'
require 'inspec/resources/yum'
require 'inspec/resources/zfs_dataset'
require 'inspec/resources/zfs_pool'

View file

@ -1,6 +1,7 @@
# copyright: 2015, Vulcano Security GmbH
require 'shellwords'
require 'inspec/utils/parser'
module Inspec::Resources
module FilePermissionsSelector
@ -13,6 +14,7 @@ module Inspec::Resources
end
end
# TODO: rename file_resource.rb
class FileResource < Inspec.resource(1)
include FilePermissionsSelector
include LinuxMountParser

View file

@ -16,7 +16,7 @@ require 'inspec/utils/file_reader'
# end
module Inspec::Resources
class LoginDef < Inspec.resource(1)
class LoginDefs < Inspec.resource(1)
name 'login_defs'
supports platform: 'unix'
desc 'Use the login_defs InSpec audit resource to test configuration settings in the /etc/login.defs file. The logins.defs file defines site-specific configuration for the shadow password suite on Linux and UNIX platforms, such as password expiration ranges, minimum/maximum values for automatic selection of user and group identifiers, or the method with which passwords are encrypted.'

View file

@ -174,7 +174,7 @@ module Inspec::Resources
end
end
class NginxConfServer
class NginxConfServer # TODO: rename NginxServer
attr_reader :params, :parent
def initialize(params, parent)
@parent = parent
@ -216,6 +216,7 @@ module Inspec::Resources
def to_s
location = Array(params['_']).join(' ')
# go three levels up: 1. to the server entry, 2. http entry and 3. to the root nginx conf
# TODO: fix parent.parent.parent
@parent.parent.parent.to_s + ", location #{location.inspect}"
end
alias inspect to_s

View file

@ -1,4 +1,3 @@
require 'inspec/resources/platform'
module Inspec::Resources

View file

@ -1,7 +1,7 @@
# copyright: 2015, Vulcano Security GmbH
module Inspec::Resources
class PowershellScript < Cmd
class Powershell < Cmd
name 'powershell'
supports platform: 'windows'
supports platform: 'unix'
@ -50,8 +50,10 @@ module Inspec::Resources
end
end
PowershellScript = Powershell
# this is deprecated syntax and will be removed in future versions
class LegacyPowershellScript < PowershellScript
class LegacyPowershell < Powershell
name 'script'
def initialize(script)
@ -59,4 +61,6 @@ module Inspec::Resources
super(script)
end
end
LegacyPowershellScript = LegacyPowershell
end

View file

@ -1,9 +1,9 @@
require 'inspec/utils/erlang_parser'
require 'inspec/utils/file_reader'
module Inspec::Resources
class RabbitmqConf < Inspec.resource(1)
class RabbitmqConfig < Inspec.resource(1)
name 'rabbitmq_conf' # TODO: this is an alias. do we want this?
name 'rabbitmq_config'
supports platform: 'unix'
desc 'Use the rabbitmq_config InSpec resource to test configuration data '\

View file

@ -0,0 +1 @@
require 'inspec/resources/powershell'

View file

@ -1,6 +1,6 @@
require 'hashie'
require 'inspec/utils/file_reader'
require 'inspec/utils/simpleconfig'
module Inspec::Resources
class Runlevels < Hash

View file

@ -4,7 +4,7 @@ require 'inspec/utils/simpleconfig'
require 'inspec/utils/file_reader'
module Inspec::Resources
class SshConf < Inspec.resource(1)
class SshConfig < Inspec.resource(1)
name 'ssh_config'
supports platform: 'unix'
desc 'Use the `ssh_config` InSpec audit resource to test OpenSSH client configuration data located at `/etc/ssh/ssh_config` on Linux and Unix platforms.'
@ -75,7 +75,7 @@ module Inspec::Resources
end
end
class SshdConf < SshConf
class SshdConfig < SshConfig
name 'sshd_config'
supports platform: 'unix'
desc 'Use the sshd_config InSpec audit resource to test configuration data for the Open SSH daemon located at /etc/ssh/sshd_config on Linux and UNIX platforms. sshd---the Open SSH daemon---listens on dedicated ports, starts a daemon for each incoming connection, and then handles encryption, authentication, key exchanges, command execution, and data exchanges.'

View file

@ -18,7 +18,7 @@ module Inspec::Resources
# Since Windows does not delete tmp files automatically, we remove the VBScript
# after we executed it
# @see https://msdn.microsoft.com/en-us/library/aa364991.aspx
class VBScript < PowershellScript
class VBScript < Powershell
name 'vbscript'
supports platform: 'windows'
desc ''

View file

@ -1,5 +1,5 @@
module Inspec::Resources
class WindowsTasks < Inspec.resource(1)
class WindowsTasks < Inspec.resource(1) # TODO: rename singular
name 'windows_task'
supports platform: 'windows'
desc 'Use the windows_task InSpec audit resource to test task schedules on Microsoft Windows.'

View file

@ -3,6 +3,8 @@
require 'method_source'
require 'inspec/describe'
require 'inspec/expect'
require 'inspec/resource'
require 'inspec/resources/os'
module Inspec
class Rule

View file

@ -117,7 +117,7 @@ module Inspec
end
elsif topic == 'matchers'
print_matchers_help
elsif !Inspec::Resource.registry[topic].nil?
elsif !Inspec::Resource.registry[topic].nil? # TODO: fix unnecessary logic
topic_info = Inspec::Resource.registry[topic]
info = "#{mark 'Name:'} #{topic}\n\n"
unless topic_info.desc.nil?

View file

@ -1,6 +1,7 @@
# copyright: 2015, Dominik Richter
require 'inspec/utils/parser'
require 'hashie'
class SimpleConfig
include CommentParser

View file

@ -1,3 +1,5 @@
require 'resource_support/aws'
class AwsIamUser < Inspec.resource(1)
name 'aws_iam_user'
desc 'Verifies settings for AWS IAM user'

View file

@ -87,8 +87,6 @@ require 'inspec/version'
require 'inspec/exceptions'
require 'inspec/fetcher'
require 'inspec/source_reader'
require 'inspec/resource'
require 'resource_support/aws'
require 'inspec/reporters'
require 'inspec/backend'
require 'inspec/profile'

View file

@ -46,6 +46,10 @@ class MockLoader
@backend = Inspec::Backend.create(Inspec::Config.mock)
mock = @backend.backend
def @backend.file(*) # BS version of it so stub calls won't blow up
super
end
# create all mock files
local = Train.create('local', command_runner: :generic).connection

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
require 'inspec/library_eval_context'
describe Inspec::LibraryEvalContext do

View file

@ -1,6 +1,8 @@
require 'helper'
require 'inspec/profile_context'
require 'inspec/resources/file'
require 'inspec/resources/command'
class Module
include Minitest::Spec::DSL

View file

@ -2,6 +2,9 @@
require 'helper'
require 'resource_support/aws'
require 'resource_support/aws/aws_resource_mixin'
describe 'AwsResourceMixin' do
describe 'initialize' do
class AwsResourceMixinError

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::AideConf' do
describe 'AideConf Parameters' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
require 'hashie'
describe 'Inspec::Resources::ApacheConf' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::AptRepo' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::AuditPolicy' do
it 'check audit policy parsing' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::AuditDaemonConf' do
it 'check audit daemon config parsing' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::AuditDaemon' do
it 'auditd interface' do

View file

@ -1,3 +1,5 @@
require 'resource_support/aws'
module MockAwsBillingReports
class Empty < AwsBackendBase
def describe_report_definitions(_query)

View file

@ -1,5 +1,9 @@
require 'helper'
require_relative 'aws_billing_backend'
require_relative 'aws_billing_backend' # TODO: move this to mocks
require 'resource_support/aws'
require 'resources/aws/aws_billing_report'
class EmptyAwsBillingReportTest < Minitest::Test
def setup

View file

@ -1,6 +1,10 @@
require 'helper'
require_relative 'aws_billing_backend'
require 'resource_support/aws'
require 'resources/aws/aws_billing_reports'
class ConstructorAwsBillingReportsTest < Minitest::Test
def setup
AwsBillingReports::BackendFactory.select(MockAwsBillingReports::Empty)

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_cloudtrail_trail'
# MACTTSB = MockAwsCloudTrailTrailSingularBackend
# Abbreviation not used outside this file
@ -183,4 +186,4 @@ module MACTTSB
fixtures.detect { |f| f.name == query[:name] }
end
end
end
end

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_cloudtrail_trails'
# MACTTPB = MockAwsCloudTrailTrailsPluralBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_cloudwatch_alarm'
# MCWAB = MockCloudwatchAlarmBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_cloudwatch_log_metric_filter'
# CWLMF = CloudwatchLogMetricFilter
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_config_delivery_channel'
# MDCSB = MockDeliveryChannelSingleBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_config_recorder'
# MCRSB = MockConfigRecorderSingleBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_ebs_volume'
class TestEbs < Minitest::Test
Id = 'volume-id'.freeze

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_ebs_volumes'
# MAEIPB = MockAwsEbsVolumesPluralBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_ec2_instance'
class TestEc2 < Minitest::Test
Id = 'instance-id'.freeze
InstanceProfile = 'instance-role'.freeze

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_ec2_instances'
# MAEIPB = MockAwsEC2InstancesPluralBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_ecs_cluster'
# MAECSB = MockAwsEcsClusterSingularBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_eks_cluster'
# MAEKSB = MockAwsEksClusterSingularBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_elb'
# MAESB = MockAwsElbSingularBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_elbs'
# MAEPB = MockAwsELBsPluralBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_flow_log'
class EmptyAwsFlowLog < Minitest::Test
def setup
AwsFlowLog::BackendFactory.select(MockAwsFlowLog::Empty)

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_access_key'
class AwsIamAccessKeyConstructorTest < Minitest::Test
def setup
AwsIamAccessKey::BackendFactory.select(EmptyMAIKSB)
@ -205,4 +208,4 @@ class BasicMAIKSB < AwsBackendBase
}
fixtures[query[:access_key_id]]
end
end
end

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_access_keys'
#==========================================================#
# Constructor Tests #
#==========================================================#

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_group'
# MAIGSB = MockAwsIamGroupSingularBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_groups'
# MAIGPB = MockAwsIamGroupsPluralBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_password_policy'
class AwsIamPasswordPolicyTest < Minitest::Test
def setup
@mock_conn = Minitest::Mock.new

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_policies'
# MAIPPB = MockAwsIamPoliciesPluralBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_policy'
# MAIPSB = MockAwsIamPolicySingularBackend
# Abbreviation not used outside this file
@ -449,4 +452,4 @@ module MAIPSB
raise Aws::IAM::Errors::NoSuchEntity.new(nil, nil)
end
end
end
end

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_role'
# MIRB = MockIamRoleBackend
# Abbreviation not used outside this file
@ -99,4 +102,4 @@ module AwsMIRB
})
end
end
end
end

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_root_user'
class AwsIamRootUserTest < Minitest::Test
def setup
@mock_conn = Minitest::Mock.new

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_user'
# MAUIB = MockAwsIamUserBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_iam_users'
# Maiusb = Mock AwsIamUsers::BackendFactory
# Abbreviation not used outside of this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_kms_key'
# MAKKSB = MockAwsKmsKeyBackend
# Abbreviation not used outside this file
@ -224,4 +227,4 @@ module MAKKSB
raise Aws::KMS::Errors::NotFoundException.new(nil, nil)
end
end
end
end

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_kms_keys'
# MAKKPB = MockAwsKmsKeysPluralBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_rds_instance'
# MRDSIB = MockRDSInstanceBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_route_table'
class EmptyAwsRouteTableTest < Minitest::Test
def setup
AwsRouteTable::BackendFactory.select(AwsMRtbB::Empty)

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_route_tables'
class EmptyAwsRouteTablesTest < Minitest::Test
def setup
AwsRouteTables::BackendFactory.select(AwsMRtbsB::Empty)

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_s3_bucket_object'
# MSBOSB = MockS3BucketObjectSingleBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_s3_bucket'
# MSBSB = MockS3BucketSingleBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_s3_buckets'
# MSBB = MockS3BucketsBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_security_group'
# MESGSB = MockEc2SecurityGroupSingleBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_security_groups'
# MESGB = MockSecurityGroupBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_sns_subscription'
# MASSSB = MockAwsSNSSubscriptionSingularBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_sns_topic'
# MSNB = MockSnsBackend
# Abbreviation not used outside this file
@ -121,4 +124,4 @@ module AwsMSNB
})
end
end
end
end

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_sns_topics'
# MSTB = MockSnsTopicsBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_sqs_queue'
# MSQB = MockSQsBackend
# Abbreviation not used outside this file
@ -123,4 +126,4 @@ module AwsMSQB
})
end
end
end
end

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_subnet'
# MVSSB = MockVpcSubnetSingleBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_subnets'
# MVSB = MockVpcSubnetsBackend
# Abbreviation not used outside this file

View file

@ -1,5 +1,8 @@
require 'helper'
require 'resource_support/aws'
require 'resources/aws/aws_vpc'
# MAVSB = MockAwsVpcSingularBackend
# Abbreviation not used outside this file

View file

@ -1,6 +1,9 @@
require 'helper'
require 'ipaddr'
require 'resource_support/aws'
require 'resources/aws/aws_vpcs'
# MAVPB = MockAwsVpcsPluralBackend
# Abbreviation not used outside this file

View file

@ -1,8 +1,7 @@
require 'helper'
require 'inspec/resource'
describe Inspec::Resources::Bash do
describe "Inspec::Resources::Bash" do
let(:x) { rand.to_s }
let(:resource) { load_resource('bash', '$("'+x+'")') }

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::Bond' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::Bridge' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
def skip(*args)
# noop

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe Inspec::Resources::Cmd do
let(:x) { rand.to_s }

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::Cpan' do
it 'verify cpan package detail parsing' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::Cran' do
it 'verify cran package detail parsing' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::Crontab' do
let(:crontab) { load_resource('crontab') }

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::CSV' do
describe 'when loading a valid csv' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::DhParams' do
let (:resource_dh_params) { load_resource('dh_params', 'dh_params.dh_pem')}

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::DockerContainer' do
describe 'docker_container' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::DockerImage' do
describe 'docker_image' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::DockerContainer' do
describe 'docker_plugin' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::DockerService' do
describe 'docker_service' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::Docker' do
describe 'docker' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::Fstab' do
let(:resource) { load_resource('etc_fstab') }

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::EtcGroup' do
let(:resource) { load_resource('etc_group') }

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::EtcHostsAllow' do
describe 'EtcHostsAllow Paramaters' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::EtcHosts' do
let(:resource) { load_resource('etc_hosts') }

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe Inspec::Resources::FileResource do
let(:file) { stub(unix_mode_mask: 000, mode: 000) }

View file

@ -1,5 +1,4 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::FileSystemResource' do
# arch linux

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::FirewallD' do
centResource = MockLoader.new(:centos7).load_resource('firewalld')

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::Gem' do
it 'verify gem is not installed' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::Group' do

View file

@ -1,6 +1,5 @@
require 'helper'
require 'inspec/resource'
describe 'groups resource on unix platform' do
let(:resource) { MockLoader.new(:ubuntu1404).load_resource('groups') }

Some files were not shown because too many files have changed in this diff Show more