From 82c9aa6ed63edbbb8befb597039d8c09c1ab5704 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Sat, 25 May 2019 01:33:26 -0700 Subject: [PATCH] Got the rest of the tests to pass. Signed-off-by: Ryan Davis --- lib/inspec/resources/apt.rb | 1 + lib/inspec/resources/audit_policy.rb | 2 ++ lib/inspec/resources/bond.rb | 2 +- lib/inspec/resources/bridge.rb | 1 + lib/inspec/resources/chocolatey_package.rb | 3 +++ lib/inspec/resources/cpan.rb | 1 + lib/inspec/resources/cran.rb | 1 + lib/inspec/resources/crontab.rb | 2 +- lib/inspec/resources/csv.rb | 1 + lib/inspec/resources/docker.rb | 1 + lib/inspec/resources/docker_container.rb | 1 + lib/inspec/resources/docker_image.rb | 1 + lib/inspec/resources/docker_plugin.rb | 1 + lib/inspec/resources/docker_service.rb | 1 + lib/inspec/resources/filesystem.rb | 2 ++ lib/inspec/resources/firewalld.rb | 1 + lib/inspec/resources/gem.rb | 1 + lib/inspec/resources/groups.rb | 4 +++- lib/inspec/resources/host.rb | 1 + lib/inspec/resources/http.rb | 1 + lib/inspec/resources/iis_app_pool.rb | 3 +++ lib/inspec/resources/iis_site.rb | 3 +++ lib/inspec/resources/ini.rb | 2 +- lib/inspec/resources/interface.rb | 3 ++- lib/inspec/resources/iptables.rb | 1 + lib/inspec/resources/kernel_module.rb | 1 + lib/inspec/resources/kernel_parameter.rb | 1 + lib/inspec/resources/mount.rb | 3 --- lib/inspec/resources/mssql_session.rb | 2 +- lib/inspec/resources/mysql_session.rb | 1 + lib/inspec/resources/nginx.rb | 1 + lib/inspec/resources/npm.rb | 2 +- lib/inspec/resources/oneget.rb | 1 + lib/inspec/resources/oracledb_session.rb | 2 +- lib/inspec/resources/package.rb | 2 ++ lib/inspec/resources/packages.rb | 1 + lib/inspec/resources/parse_config.rb | 1 + lib/inspec/resources/pip.rb | 3 ++- lib/inspec/resources/processes.rb | 1 + lib/inspec/resources/registry_key.rb | 1 + lib/inspec/resources/security_identifier.rb | 2 ++ lib/inspec/resources/security_policy.rb | 2 ++ lib/inspec/resources/sys_info.rb | 3 +++ lib/inspec/resources/vbscript.rb | 2 +- lib/inspec/resources/windows_feature.rb | 1 + lib/inspec/resources/windows_hotfix.rb | 1 + lib/inspec/resources/windows_task.rb | 2 ++ lib/inspec/resources/wmi.rb | 2 +- lib/inspec/resources/xml.rb | 1 + lib/inspec/resources/yum.rb | 1 + lib/inspec/resources/zfs_dataset.rb | 1 + lib/inspec/resources/zfs_pool.rb | 1 + lib/inspec/utils/parser.rb | 4 ++++ lib/resource_support/aws/aws_plural_resource_mixin.rb | 3 +++ lib/resource_support/aws/aws_singular_resource_mixin.rb | 3 +++ lib/resources/aws/aws_billing_report.rb | 7 +++++++ lib/resources/aws/aws_billing_reports.rb | 3 +++ lib/resources/aws/aws_cloudtrail_trail.rb | 4 ++++ lib/resources/aws/aws_cloudtrail_trails.rb | 4 ++++ lib/resources/aws/aws_cloudwatch_alarm.rb | 4 ++++ lib/resources/aws/aws_cloudwatch_log_metric_filter.rb | 4 ++++ lib/resources/aws/aws_config_delivery_channel.rb | 4 ++++ lib/resources/aws/aws_config_recorder.rb | 4 ++++ lib/resources/aws/aws_ebs_volume.rb | 4 ++++ lib/resources/aws/aws_ebs_volumes.rb | 4 ++++ lib/resources/aws/aws_ec2_instance.rb | 4 ++++ lib/resources/aws/aws_ec2_instances.rb | 4 ++++ lib/resources/aws/aws_ecs_cluster.rb | 4 ++++ lib/resources/aws/aws_eks_cluster.rb | 4 ++++ lib/resources/aws/aws_elb.rb | 4 ++++ lib/resources/aws/aws_elbs.rb | 4 ++++ lib/resources/aws/aws_flow_log.rb | 4 ++++ lib/resources/aws/aws_iam_access_key.rb | 4 ++++ lib/resources/aws/aws_iam_access_keys.rb | 4 ++++ lib/resources/aws/aws_iam_group.rb | 4 ++++ lib/resources/aws/aws_iam_groups.rb | 4 ++++ lib/resources/aws/aws_iam_password_policy.rb | 4 ++++ lib/resources/aws/aws_iam_policies.rb | 4 ++++ lib/resources/aws/aws_iam_policy.rb | 4 ++++ lib/resources/aws/aws_iam_role.rb | 4 ++++ lib/resources/aws/aws_iam_root_user.rb | 4 ++++ lib/resources/aws/aws_iam_user.rb | 4 +++- lib/resources/aws/aws_iam_users.rb | 4 ++++ lib/resources/aws/aws_kms_key.rb | 4 ++++ lib/resources/aws/aws_kms_keys.rb | 4 ++++ lib/resources/aws/aws_rds_instance.rb | 4 ++++ lib/resources/aws/aws_route_table.rb | 4 ++++ lib/resources/aws/aws_route_tables.rb | 4 ++++ lib/resources/aws/aws_s3_bucket.rb | 4 ++++ lib/resources/aws/aws_s3_bucket_object.rb | 4 ++++ lib/resources/aws/aws_s3_buckets.rb | 4 ++++ lib/resources/aws/aws_security_group.rb | 4 ++++ lib/resources/aws/aws_security_groups.rb | 4 ++++ lib/resources/aws/aws_sns_subscription.rb | 4 ++++ lib/resources/aws/aws_sns_topic.rb | 4 ++++ lib/resources/aws/aws_sns_topics.rb | 4 ++++ lib/resources/aws/aws_sqs_queue.rb | 4 ++++ lib/resources/aws/aws_subnet.rb | 4 ++++ lib/resources/aws/aws_subnets.rb | 4 ++++ lib/resources/aws/aws_vpc.rb | 4 ++++ lib/resources/aws/aws_vpcs.rb | 4 ++++ test/unit/reporters/automate_test.rb | 2 +- test/unit/reporters/base_test.rb | 2 +- test/unit/reporters/cli_test.rb | 2 +- test/unit/reporters/json_automate_test.rb | 2 +- test/unit/reporters/json_min_test.rb | 2 +- test/unit/reporters/json_test.rb | 2 +- test/unit/reporters/junit_test.rb | 2 +- test/unit/reporters/yaml_test.rb | 2 +- test/unit/resources/aide_conf_test.rb | 2 ++ test/unit/resources/apache_conf_test.rb | 2 ++ test/unit/resources/apt_test.rb | 2 ++ test/unit/resources/audit_policy_test.rb | 2 ++ test/unit/resources/auditd_conf_test.rb | 2 ++ test/unit/resources/auditd_test.rb | 2 ++ test/unit/resources/aws_billing_report_test.rb | 2 ++ test/unit/resources/aws_billing_reports_test.rb | 2 ++ test/unit/resources/aws_cloudtrail_trail_test.rb | 2 ++ test/unit/resources/aws_cloudtrail_trails_test.rb | 2 ++ test/unit/resources/aws_cloudwatch_alarm_test.rb | 2 ++ .../resources/aws_cloudwatch_log_metric_filter_test.rb | 2 ++ test/unit/resources/aws_config_delivery_channel_test.rb | 2 ++ test/unit/resources/aws_config_recorder_test.rb | 2 ++ test/unit/resources/aws_ebs_volume_test.rb | 2 ++ test/unit/resources/aws_ebs_volumes_test.rb | 2 ++ test/unit/resources/aws_ec2_instance_test.rb | 2 ++ test/unit/resources/aws_ec2_instances_test.rb | 2 ++ test/unit/resources/aws_ecs_cluster_test.rb | 2 ++ test/unit/resources/aws_eks_cluster_test.rb | 2 ++ test/unit/resources/aws_elb_test.rb | 2 ++ test/unit/resources/aws_elbs_test.rb | 2 ++ test/unit/resources/aws_flow_log_test.rb | 2 ++ test/unit/resources/aws_iam_access_key_test.rb | 2 ++ test/unit/resources/aws_iam_access_keys_test.rb | 2 ++ test/unit/resources/aws_iam_group_test.rb | 2 ++ test/unit/resources/aws_iam_groups_test.rb | 2 ++ test/unit/resources/aws_iam_password_policy_test.rb | 2 ++ test/unit/resources/aws_iam_policies_test.rb | 2 ++ test/unit/resources/aws_iam_policy_test.rb | 2 ++ test/unit/resources/aws_iam_role_test.rb | 2 ++ test/unit/resources/aws_iam_root_user_test.rb | 2 ++ test/unit/resources/aws_iam_user_test.rb | 2 ++ test/unit/resources/aws_iam_users_test.rb | 2 ++ test/unit/resources/aws_kms_key_test.rb | 2 ++ test/unit/resources/aws_kms_keys_test.rb | 2 ++ test/unit/resources/aws_rds_instance_test.rb | 2 ++ test/unit/resources/aws_route_table_test.rb | 2 ++ test/unit/resources/aws_route_tables_test.rb | 2 ++ test/unit/resources/aws_s3_bucket_object_test.rb | 2 ++ test/unit/resources/aws_s3_bucket_test.rb | 2 ++ test/unit/resources/aws_s3_buckets_test.rb | 2 ++ test/unit/resources/aws_security_group_test.rb | 2 ++ test/unit/resources/aws_security_groups_test.rb | 2 ++ test/unit/resources/aws_sns_subscription_test.rb | 2 ++ test/unit/resources/aws_sns_topic_test.rb | 2 ++ test/unit/resources/aws_sns_topics_test.rb | 2 ++ test/unit/resources/aws_sqs_queue_test.rb | 2 ++ test/unit/resources/aws_subnet_test.rb | 2 ++ test/unit/resources/aws_subnets_test.rb | 2 ++ test/unit/resources/aws_vpc_test.rb | 2 ++ test/unit/resources/aws_vpcs_test.rb | 2 ++ test/unit/resources/bash_test.rb | 2 ++ test/unit/resources/bond_test.rb | 2 ++ test/unit/resources/bridge_test.rb | 2 ++ test/unit/resources/chocolatey_package_test.rb | 2 ++ test/unit/resources/command_test.rb | 2 ++ test/unit/resources/cpan_test.rb | 2 ++ test/unit/resources/cran_test.rb | 2 ++ test/unit/resources/crontab_test.rb | 2 ++ test/unit/resources/csv_test.rb | 2 ++ test/unit/resources/dh_params_test.rb | 2 ++ test/unit/resources/docker_container_test.rb | 2 ++ test/unit/resources/docker_image_test.rb | 2 ++ test/unit/resources/docker_plugin_test.rb | 2 ++ test/unit/resources/docker_service_test.rb | 2 ++ test/unit/resources/docker_test.rb | 2 ++ test/unit/resources/elasticsearch_test.rb | 2 ++ test/unit/resources/etc_fstab_test.rb | 2 ++ test/unit/resources/etc_group_test.rb | 2 ++ test/unit/resources/etc_hosts_allow_deny_test.rb | 2 ++ test/unit/resources/etc_hosts_test.rb | 2 ++ test/unit/resources/file_test.rb | 2 ++ test/unit/resources/filesystem_test.rb | 2 ++ test/unit/resources/firewalld_test.rb | 2 ++ test/unit/resources/gem_test.rb | 2 ++ test/unit/resources/group_test.rb | 2 ++ test/unit/resources/groups_test.rb | 2 ++ test/unit/resources/grub_conf_test.rb | 2 ++ test/unit/resources/host_test.rb | 2 ++ test/unit/resources/http_test.rb | 2 ++ test/unit/resources/iis_app_pool_test.rb | 2 ++ test/unit/resources/iis_site_test.rb | 2 ++ test/unit/resources/inetd_conf_test.rb | 2 ++ test/unit/resources/ini_test.rb | 2 ++ test/unit/resources/interface_test.rb | 2 ++ test/unit/resources/iptables_test.rb | 2 ++ test/unit/resources/json_test.rb | 2 ++ test/unit/resources/kernel_module_test.rb | 2 ++ test/unit/resources/kernel_parameter_test.rb | 2 ++ test/unit/resources/key_rsa_test.rb | 2 ++ test/unit/resources/ksh_test.rb | 2 ++ test/unit/resources/limits_conf_test.rb | 2 ++ test/unit/resources/login_def_test.rb | 2 ++ test/unit/resources/mount_test.rb | 3 +++ test/unit/resources/mssql_session_test.rb | 2 ++ test/unit/resources/mysql_conf_test.rb | 2 ++ test/unit/resources/mysql_session_test.rb | 2 ++ test/unit/resources/nginx_conf_test.rb | 2 ++ test/unit/resources/nginx_test.rb | 2 ++ test/unit/resources/npm_test.rb | 2 ++ test/unit/resources/ntp_conf_test.rb | 2 ++ test/unit/resources/oneget_test.rb | 2 ++ test/unit/resources/oracledb_session_test.rb | 2 ++ test/unit/resources/os_env_test.rb | 2 ++ test/unit/resources/os_test.rb | 2 ++ test/unit/resources/package_test.rb | 2 ++ test/unit/resources/packages_test.rb | 2 ++ test/unit/resources/parse_config_test.rb | 2 ++ test/unit/resources/passwd_test.rb | 2 ++ test/unit/resources/pip_test.rb | 2 ++ test/unit/resources/platform_test.rb | 2 ++ test/unit/resources/port_linuxports_test.rb | 4 +++- test/unit/resources/port_test.rb | 2 ++ test/unit/resources/postgres_conf_test.rb | 2 ++ test/unit/resources/postgres_hba_conf_test.rb | 2 ++ test/unit/resources/postgres_ident_conf_test.rb | 3 +++ test/unit/resources/postgres_session_test.rb | 2 ++ test/unit/resources/powershell_test.rb | 2 ++ test/unit/resources/processes_test.rb | 2 ++ test/unit/resources/rabbitmq_conf_test.rb | 2 ++ test/unit/resources/registry_key_test.rb | 2 ++ test/unit/resources/security_identifier_test.rb | 2 ++ test/unit/resources/security_policy_test.rb | 2 ++ test/unit/resources/service_test.rb | 2 ++ test/unit/resources/shadow_test.rb | 2 ++ test/unit/resources/ssh_conf_test.rb | 2 ++ test/unit/resources/ssl_test.rb | 2 ++ test/unit/resources/sys_info_test.rb | 2 ++ test/unit/resources/toml_test.rb | 2 ++ test/unit/resources/vbscript_test.rb | 2 ++ test/unit/resources/virtualization_test.rb | 3 +++ test/unit/resources/windows_feature_test.rb | 2 ++ test/unit/resources/windows_hotfix_test.rb | 2 ++ test/unit/resources/windows_task_test.rb | 2 ++ test/unit/resources/wmi_test.rb | 2 ++ test/unit/resources/x509_certificate_test.rb | 2 ++ test/unit/resources/xinetd_conf_test.rb | 2 ++ test/unit/resources/xml_test.rb | 2 ++ test/unit/resources/yaml_test.rb | 2 ++ test/unit/resources/yum_test.rb | 2 ++ test/unit/resources/zfs_dataset_test.rb | 2 ++ test/unit/resources/zfs_pool_test.rb | 2 ++ 252 files changed, 562 insertions(+), 24 deletions(-) diff --git a/lib/inspec/resources/apt.rb b/lib/inspec/resources/apt.rb index f99d2f0f3..7cd17ebce 100644 --- a/lib/inspec/resources/apt.rb +++ b/lib/inspec/resources/apt.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' # Verifies apt and ppa repositories # diff --git a/lib/inspec/resources/audit_policy.rb b/lib/inspec/resources/audit_policy.rb index 43ba7c49c..54a397e06 100644 --- a/lib/inspec/resources/audit_policy.rb +++ b/lib/inspec/resources/audit_policy.rb @@ -1,3 +1,5 @@ +require 'inspec/resources/command' + # copyright: 2015, Vulcano Security GmbH # Advanced Auditing: diff --git a/lib/inspec/resources/bond.rb b/lib/inspec/resources/bond.rb index 47d2464f0..11a54ff1d 100644 --- a/lib/inspec/resources/bond.rb +++ b/lib/inspec/resources/bond.rb @@ -1,6 +1,6 @@ - require 'inspec/resources/file' require 'inspec/utils/file_reader' +require 'inspec/utils/simpleconfig' module Inspec::Resources class Bond < FileResource diff --git a/lib/inspec/resources/bridge.rb b/lib/inspec/resources/bridge.rb index 82fc37f78..e5901785b 100644 --- a/lib/inspec/resources/bridge.rb +++ b/lib/inspec/resources/bridge.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/file' # Usage: # describe bridge('br0') do diff --git a/lib/inspec/resources/chocolatey_package.rb b/lib/inspec/resources/chocolatey_package.rb index a8924d915..c717087c2 100644 --- a/lib/inspec/resources/chocolatey_package.rb +++ b/lib/inspec/resources/chocolatey_package.rb @@ -1,5 +1,8 @@ # frozen_string_literal: true +require 'inspec/resources/command' +require 'inspec/resources/powershell' + # Check for Chocolatey packages to be installed module Inspec::Resources class ChocoPkg < Inspec.resource(1) diff --git a/lib/inspec/resources/cpan.rb b/lib/inspec/resources/cpan.rb index 02fcb3ac0..d235a65d5 100644 --- a/lib/inspec/resources/cpan.rb +++ b/lib/inspec/resources/cpan.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' # Usage: # describe cpan('DBD::Pg') do diff --git a/lib/inspec/resources/cran.rb b/lib/inspec/resources/cran.rb index a2bd54ad2..6194a12a6 100644 --- a/lib/inspec/resources/cran.rb +++ b/lib/inspec/resources/cran.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' # Usage: # describe cran('DBI') do diff --git a/lib/inspec/resources/crontab.rb b/lib/inspec/resources/crontab.rb index daf62f622..479e3175e 100644 --- a/lib/inspec/resources/crontab.rb +++ b/lib/inspec/resources/crontab.rb @@ -1,4 +1,4 @@ - +require 'inspec/resources/file' require 'inspec/utils/parser' require 'inspec/utils/filter' diff --git a/lib/inspec/resources/csv.rb b/lib/inspec/resources/csv.rb index 3d2a4b75b..345a57db5 100644 --- a/lib/inspec/resources/csv.rb +++ b/lib/inspec/resources/csv.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/json' # Parses a csv document # This implementation was inspired by a blog post diff --git a/lib/inspec/resources/docker.rb b/lib/inspec/resources/docker.rb index a4bdf547c..b7a0e9f4a 100644 --- a/lib/inspec/resources/docker.rb +++ b/lib/inspec/resources/docker.rb @@ -2,6 +2,7 @@ # Copyright 2017, Christoph Hartmann # +require 'inspec/resources/command' require 'inspec/utils/filter' require 'hashie/mash' diff --git a/lib/inspec/resources/docker_container.rb b/lib/inspec/resources/docker_container.rb index 1e57b79a3..ee2df90ee 100644 --- a/lib/inspec/resources/docker_container.rb +++ b/lib/inspec/resources/docker_container.rb @@ -1,6 +1,7 @@ # # Copyright 2017, Christoph Hartmann +require 'inspec/resources/docker' require_relative 'docker_object' module Inspec::Resources diff --git a/lib/inspec/resources/docker_image.rb b/lib/inspec/resources/docker_image.rb index f05f631ed..b19d660f9 100644 --- a/lib/inspec/resources/docker_image.rb +++ b/lib/inspec/resources/docker_image.rb @@ -1,6 +1,7 @@ # # Copyright 2017, Christoph Hartmann +require 'inspec/resources/docker' require_relative 'docker_object' module Inspec::Resources diff --git a/lib/inspec/resources/docker_plugin.rb b/lib/inspec/resources/docker_plugin.rb index f5ce8dd46..dc2fbbe4a 100644 --- a/lib/inspec/resources/docker_plugin.rb +++ b/lib/inspec/resources/docker_plugin.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/docker' module Inspec::Resources class DockerPlugin < Inspec.resource(1) diff --git a/lib/inspec/resources/docker_service.rb b/lib/inspec/resources/docker_service.rb index 7594235dc..1d77a3ff5 100644 --- a/lib/inspec/resources/docker_service.rb +++ b/lib/inspec/resources/docker_service.rb @@ -1,6 +1,7 @@ # # Copyright 2017, Christoph Hartmann +require 'inspec/resources/docker' require_relative 'docker_object' module Inspec::Resources diff --git a/lib/inspec/resources/filesystem.rb b/lib/inspec/resources/filesystem.rb index 02c8575e8..61dd0458e 100644 --- a/lib/inspec/resources/filesystem.rb +++ b/lib/inspec/resources/filesystem.rb @@ -1,3 +1,5 @@ +require 'inspec/resources/command' + module Inspec::Resources class FileSystemResource < Inspec.resource(1) name 'filesystem' diff --git a/lib/inspec/resources/firewalld.rb b/lib/inspec/resources/firewalld.rb index 5aacc6975..7f4b10557 100644 --- a/lib/inspec/resources/firewalld.rb +++ b/lib/inspec/resources/firewalld.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' module Inspec::Resources class FirewallD < Inspec.resource(1) diff --git a/lib/inspec/resources/gem.rb b/lib/inspec/resources/gem.rb index 2f04ef8c0..6d5d93cc1 100644 --- a/lib/inspec/resources/gem.rb +++ b/lib/inspec/resources/gem.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' module Inspec::Resources class GemPackage < Inspec.resource(1) diff --git a/lib/inspec/resources/groups.rb b/lib/inspec/resources/groups.rb index c738a9623..b7f1197fd 100644 --- a/lib/inspec/resources/groups.rb +++ b/lib/inspec/resources/groups.rb @@ -1,4 +1,6 @@ - +require 'inspec/resources/etc_group' +require 'inspec/resources/powershell' +require 'inspec/resources/parse_config' require 'inspec/utils/filter' module Inspec::Resources diff --git a/lib/inspec/resources/host.rb b/lib/inspec/resources/host.rb index 33cb49ce7..2f27fb9c1 100644 --- a/lib/inspec/resources/host.rb +++ b/lib/inspec/resources/host.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' # Usage: # describe host('example.com') do diff --git a/lib/inspec/resources/http.rb b/lib/inspec/resources/http.rb index f1755144f..21538dd82 100644 --- a/lib/inspec/resources/http.rb +++ b/lib/inspec/resources/http.rb @@ -2,6 +2,7 @@ # copyright: 2017, Chef Software Inc # license: Apache v2 +require 'inspec/resources/command' require 'faraday' require 'faraday_middleware' require 'hashie' diff --git a/lib/inspec/resources/iis_app_pool.rb b/lib/inspec/resources/iis_app_pool.rb index a51914c95..34e789cd4 100644 --- a/lib/inspec/resources/iis_app_pool.rb +++ b/lib/inspec/resources/iis_app_pool.rb @@ -1,4 +1,7 @@ # frozen_string_literal: true + +require 'inspec/resources/powershell' + # check for web applications in IIS # Note: this is only supported in windows 2012 and later diff --git a/lib/inspec/resources/iis_site.rb b/lib/inspec/resources/iis_site.rb index 0999a3cff..cd003ab81 100644 --- a/lib/inspec/resources/iis_site.rb +++ b/lib/inspec/resources/iis_site.rb @@ -1,4 +1,7 @@ # frozen_string_literal: true + +require 'inspec/resources/command' + # check for site in IIS # Usage: # describe iis_site('Default Web Site') do diff --git a/lib/inspec/resources/ini.rb b/lib/inspec/resources/ini.rb index 5061bac84..97f246ea7 100644 --- a/lib/inspec/resources/ini.rb +++ b/lib/inspec/resources/ini.rb @@ -1,4 +1,4 @@ - +require 'inspec/resources/json' require 'inspec/utils/simpleconfig' module Inspec::Resources diff --git a/lib/inspec/resources/interface.rb b/lib/inspec/resources/interface.rb index c817f4d26..fc7c68aaf 100644 --- a/lib/inspec/resources/interface.rb +++ b/lib/inspec/resources/interface.rb @@ -1,5 +1,6 @@ - +require 'inspec/resources/command' require 'inspec/utils/convert' +require 'inspec/utils/simpleconfig' module Inspec::Resources class NetworkInterface < Inspec.resource(1) diff --git a/lib/inspec/resources/iptables.rb b/lib/inspec/resources/iptables.rb index 6c51615b9..c15dbe056 100644 --- a/lib/inspec/resources/iptables.rb +++ b/lib/inspec/resources/iptables.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' # Usage: # describe iptables do diff --git a/lib/inspec/resources/kernel_module.rb b/lib/inspec/resources/kernel_module.rb index 9816746fc..adc7ddfb1 100644 --- a/lib/inspec/resources/kernel_module.rb +++ b/lib/inspec/resources/kernel_module.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' module Inspec::Resources class KernelModule < Inspec.resource(1) diff --git a/lib/inspec/resources/kernel_parameter.rb b/lib/inspec/resources/kernel_parameter.rb index ad179565b..51f57373c 100644 --- a/lib/inspec/resources/kernel_parameter.rb +++ b/lib/inspec/resources/kernel_parameter.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' module Inspec::Resources class KernelParameter < Inspec.resource(1) diff --git a/lib/inspec/resources/mount.rb b/lib/inspec/resources/mount.rb index a52a6f6fb..ae6d3a448 100644 --- a/lib/inspec/resources/mount.rb +++ b/lib/inspec/resources/mount.rb @@ -1,6 +1,3 @@ - -require 'inspec/utils/simpleconfig' - module Inspec::Resources class Mount < Inspec.resource(1) name 'mount' diff --git a/lib/inspec/resources/mssql_session.rb b/lib/inspec/resources/mssql_session.rb index 8bd68e091..05cbfc5db 100644 --- a/lib/inspec/resources/mssql_session.rb +++ b/lib/inspec/resources/mssql_session.rb @@ -1,4 +1,4 @@ - +require 'inspec/resources/command' require 'hashie/mash' require 'inspec/utils/database_helpers' diff --git a/lib/inspec/resources/mysql_session.rb b/lib/inspec/resources/mysql_session.rb index dbd160db1..fd3bb6c86 100644 --- a/lib/inspec/resources/mysql_session.rb +++ b/lib/inspec/resources/mysql_session.rb @@ -1,5 +1,6 @@ # copyright: 2015, Vulcano Security GmbH +require 'inspec/resources/command' require 'shellwords' module Inspec::Resources diff --git a/lib/inspec/resources/nginx.rb b/lib/inspec/resources/nginx.rb index 0e3df9858..3bb91a63c 100644 --- a/lib/inspec/resources/nginx.rb +++ b/lib/inspec/resources/nginx.rb @@ -1,6 +1,7 @@ require 'pathname' require 'hashie/mash' +require 'inspec/resources/command' module Inspec::Resources class Nginx < Inspec.resource(1) diff --git a/lib/inspec/resources/npm.rb b/lib/inspec/resources/npm.rb index 631d41db8..812151c56 100644 --- a/lib/inspec/resources/npm.rb +++ b/lib/inspec/resources/npm.rb @@ -1,4 +1,4 @@ - +require 'inspec/resources/command' require 'shellwords' module Inspec::Resources diff --git a/lib/inspec/resources/oneget.rb b/lib/inspec/resources/oneget.rb index ee4718273..c83600255 100644 --- a/lib/inspec/resources/oneget.rb +++ b/lib/inspec/resources/oneget.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' # This resource talks with OneGet (https://github.com/OneGet/oneget) # Its part of Windows Management Framework 5.0 and part of Windows 10 diff --git a/lib/inspec/resources/oracledb_session.rb b/lib/inspec/resources/oracledb_session.rb index defe0fd26..c251d63b5 100644 --- a/lib/inspec/resources/oracledb_session.rb +++ b/lib/inspec/resources/oracledb_session.rb @@ -1,4 +1,4 @@ - +require 'inspec/resources/command' require 'hashie/mash' require 'inspec/utils/database_helpers' require 'htmlentities' diff --git a/lib/inspec/resources/package.rb b/lib/inspec/resources/package.rb index be46d5023..6fbdc5a1a 100644 --- a/lib/inspec/resources/package.rb +++ b/lib/inspec/resources/package.rb @@ -1,3 +1,5 @@ +require 'inspec/resources/directory' +require 'inspec/utils/simpleconfig' # Resource to determine package information # diff --git a/lib/inspec/resources/packages.rb b/lib/inspec/resources/packages.rb index 24a9ecfb2..26842ffd5 100644 --- a/lib/inspec/resources/packages.rb +++ b/lib/inspec/resources/packages.rb @@ -1,6 +1,7 @@ # copyright: 2017, Chef Software, Inc. require 'inspec/utils/filter' +require 'inspec/resources/command' module Inspec::Resources class Packages < Inspec.resource(1) diff --git a/lib/inspec/resources/parse_config.rb b/lib/inspec/resources/parse_config.rb index 2b457562b..ec9698d41 100644 --- a/lib/inspec/resources/parse_config.rb +++ b/lib/inspec/resources/parse_config.rb @@ -10,6 +10,7 @@ # describe parse_config(audit, options ) do require 'inspec/utils/file_reader' +require 'inspec/utils/simpleconfig' module Inspec::Resources class PConfig < Inspec.resource(1) diff --git a/lib/inspec/resources/pip.rb b/lib/inspec/resources/pip.rb index 1a381adff..bd6533c8d 100644 --- a/lib/inspec/resources/pip.rb +++ b/lib/inspec/resources/pip.rb @@ -1,9 +1,10 @@ +require 'inspec/resources/command' +require 'inspec/utils/simpleconfig' # Usage: # describe pip('Jinja2') do # it { should be_installed } # end -# module Inspec::Resources class PipPackage < Inspec.resource(1) diff --git a/lib/inspec/resources/processes.rb b/lib/inspec/resources/processes.rb index 1957f6ee5..741dae8bf 100644 --- a/lib/inspec/resources/processes.rb +++ b/lib/inspec/resources/processes.rb @@ -2,6 +2,7 @@ require 'inspec/utils/filter' require 'ostruct' +require 'inspec/resources/command' module Inspec::Resources class Processes < Inspec.resource(1) diff --git a/lib/inspec/resources/registry_key.rb b/lib/inspec/resources/registry_key.rb index 249482064..2386afded 100644 --- a/lib/inspec/resources/registry_key.rb +++ b/lib/inspec/resources/registry_key.rb @@ -1,6 +1,7 @@ # copyright: 2015, Vulcano Security GmbH require 'json' +require 'inspec/resources/powershell' # Three constructor methods are available: # 1. resistry_key(path'): diff --git a/lib/inspec/resources/security_identifier.rb b/lib/inspec/resources/security_identifier.rb index f5d7fca30..8b24c3d49 100644 --- a/lib/inspec/resources/security_identifier.rb +++ b/lib/inspec/resources/security_identifier.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'inspec/resources/command' + module Inspec::Resources class SecurityIdentifier < Inspec.resource(1) name 'security_identifier' diff --git a/lib/inspec/resources/security_policy.rb b/lib/inspec/resources/security_policy.rb index 49bb66c17..214ab0a5d 100644 --- a/lib/inspec/resources/security_policy.rb +++ b/lib/inspec/resources/security_policy.rb @@ -11,6 +11,8 @@ # parameters. Therefore we need a combination of Registry and secedit output require 'hashie' +require 'inspec/resources/command' +require 'inspec/utils/simpleconfig' module Inspec::Resources # known and supported MS privilege rights diff --git a/lib/inspec/resources/sys_info.rb b/lib/inspec/resources/sys_info.rb index 9867127e1..c461bd26f 100644 --- a/lib/inspec/resources/sys_info.rb +++ b/lib/inspec/resources/sys_info.rb @@ -1,3 +1,6 @@ +require 'inspec/resources/command' +require 'inspec/resources/powershell' + module Inspec::Resources # this resource returns additional system informatio class System < Inspec.resource(1) diff --git a/lib/inspec/resources/vbscript.rb b/lib/inspec/resources/vbscript.rb index a808f64ee..fea794ee5 100644 --- a/lib/inspec/resources/vbscript.rb +++ b/lib/inspec/resources/vbscript.rb @@ -1,4 +1,4 @@ - +require 'inspec/resources/powershell' require 'securerandom' module Inspec::Resources diff --git a/lib/inspec/resources/windows_feature.rb b/lib/inspec/resources/windows_feature.rb index 38034613e..3bc2022ba 100644 --- a/lib/inspec/resources/windows_feature.rb +++ b/lib/inspec/resources/windows_feature.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' module Inspec::Resources class WindowsFeature < Inspec.resource(1) diff --git a/lib/inspec/resources/windows_hotfix.rb b/lib/inspec/resources/windows_hotfix.rb index 8b9719b5b..72e449ca1 100644 --- a/lib/inspec/resources/windows_hotfix.rb +++ b/lib/inspec/resources/windows_hotfix.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/powershell' module Inspec::Resources class WindowsHotfix < Inspec.resource(1) diff --git a/lib/inspec/resources/windows_task.rb b/lib/inspec/resources/windows_task.rb index 249ac32ea..5d9085c1a 100644 --- a/lib/inspec/resources/windows_task.rb +++ b/lib/inspec/resources/windows_task.rb @@ -1,3 +1,5 @@ +require 'inspec/resources/powershell' + module Inspec::Resources class WindowsTasks < Inspec.resource(1) # TODO: rename singular name 'windows_task' diff --git a/lib/inspec/resources/wmi.rb b/lib/inspec/resources/wmi.rb index f29e7326c..6ed81de8a 100644 --- a/lib/inspec/resources/wmi.rb +++ b/lib/inspec/resources/wmi.rb @@ -1,4 +1,4 @@ - +require 'inspec/resources/powershell' require 'inspec/utils/object_traversal' module Inspec::Resources diff --git a/lib/inspec/resources/xml.rb b/lib/inspec/resources/xml.rb index f2ce317be..c7537f0d1 100644 --- a/lib/inspec/resources/xml.rb +++ b/lib/inspec/resources/xml.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/json' module Inspec::Resources class XmlConfig < JsonConfig diff --git a/lib/inspec/resources/yum.rb b/lib/inspec/resources/yum.rb index fcf4d044b..20f96d971 100644 --- a/lib/inspec/resources/yum.rb +++ b/lib/inspec/resources/yum.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' # Usage: # describe yum do diff --git a/lib/inspec/resources/zfs_dataset.rb b/lib/inspec/resources/zfs_dataset.rb index 5eb11d083..ea840116f 100644 --- a/lib/inspec/resources/zfs_dataset.rb +++ b/lib/inspec/resources/zfs_dataset.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' module Inspec::Resources class ZfsDataset < Inspec.resource(1) diff --git a/lib/inspec/resources/zfs_pool.rb b/lib/inspec/resources/zfs_pool.rb index bed9c7bc9..d9b99f77f 100644 --- a/lib/inspec/resources/zfs_pool.rb +++ b/lib/inspec/resources/zfs_pool.rb @@ -1,3 +1,4 @@ +require 'inspec/resources/command' module Inspec::Resources class ZfsPool < Inspec.resource(1) diff --git a/lib/inspec/utils/parser.rb b/lib/inspec/utils/parser.rb index 8b57d147d..6cc540136 100644 --- a/lib/inspec/utils/parser.rb +++ b/lib/inspec/utils/parser.rb @@ -1,4 +1,6 @@ +require 'inspec/resources/command' + module PasswdParser # Parse /etc/passwd files. # @@ -269,3 +271,5 @@ module XinetdParser res end end + +require 'inspec/utils/simpleconfig' diff --git a/lib/resource_support/aws/aws_plural_resource_mixin.rb b/lib/resource_support/aws/aws_plural_resource_mixin.rb index 1c44746c6..c8f588971 100644 --- a/lib/resource_support/aws/aws_plural_resource_mixin.rb +++ b/lib/resource_support/aws/aws_plural_resource_mixin.rb @@ -1,3 +1,6 @@ +require 'resource_support/aws/aws_resource_mixin' +require 'resource_support/aws/aws_backend_factory_mixin' + module AwsPluralResourceMixin include AwsResourceMixin attr_reader :table diff --git a/lib/resource_support/aws/aws_singular_resource_mixin.rb b/lib/resource_support/aws/aws_singular_resource_mixin.rb index a34556f88..accf71f60 100644 --- a/lib/resource_support/aws/aws_singular_resource_mixin.rb +++ b/lib/resource_support/aws/aws_singular_resource_mixin.rb @@ -1,3 +1,6 @@ +require 'resource_support/aws/aws_resource_mixin' +require 'resource_support/aws/aws_backend_factory_mixin' + module AwsSingularResourceMixin include AwsResourceMixin diff --git a/lib/resources/aws/aws_billing_report.rb b/lib/resources/aws/aws_billing_report.rb index 865812a90..5beb4bdd7 100644 --- a/lib/resources/aws/aws_billing_report.rb +++ b/lib/resources/aws/aws_billing_report.rb @@ -1,3 +1,10 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' + +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-costandusagereportservice.rb' + class AwsBillingReport < Inspec.resource(1) name 'aws_billing_report' supports platform: 'aws' diff --git a/lib/resources/aws/aws_billing_reports.rb b/lib/resources/aws/aws_billing_reports.rb index d6da2b234..97696232c 100644 --- a/lib/resources/aws/aws_billing_reports.rb +++ b/lib/resources/aws/aws_billing_reports.rb @@ -1,4 +1,7 @@ require 'inspec/utils/filter' +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-costandusagereportservice' class AwsBillingReports < Inspec.resource(1) name 'aws_billing_reports' diff --git a/lib/resources/aws/aws_cloudtrail_trail.rb b/lib/resources/aws/aws_cloudtrail_trail.rb index a3ac6e73c..57a437208 100644 --- a/lib/resources/aws/aws_cloudtrail_trail.rb +++ b/lib/resources/aws/aws_cloudtrail_trail.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-cloudtrail' + class AwsCloudTrailTrail < Inspec.resource(1) name 'aws_cloudtrail_trail' desc 'Verifies settings for an individual AWS CloudTrail Trail' diff --git a/lib/resources/aws/aws_cloudtrail_trails.rb b/lib/resources/aws/aws_cloudtrail_trails.rb index bc5c4e309..d6d3d96d9 100644 --- a/lib/resources/aws/aws_cloudtrail_trails.rb +++ b/lib/resources/aws/aws_cloudtrail_trails.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-cloudtrail' + class AwsCloudTrailTrails < Inspec.resource(1) name 'aws_cloudtrail_trails' desc 'Verifies settings for AWS CloudTrail Trails in bulk' diff --git a/lib/resources/aws/aws_cloudwatch_alarm.rb b/lib/resources/aws/aws_cloudwatch_alarm.rb index 92a93ea26..72b89be80 100644 --- a/lib/resources/aws/aws_cloudwatch_alarm.rb +++ b/lib/resources/aws/aws_cloudwatch_alarm.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-cloudwatch' + class AwsCloudwatchAlarm < Inspec.resource(1) name 'aws_cloudwatch_alarm' desc <<~EXAMPLE diff --git a/lib/resources/aws/aws_cloudwatch_log_metric_filter.rb b/lib/resources/aws/aws_cloudwatch_log_metric_filter.rb index bb2b5ff34..663908946 100644 --- a/lib/resources/aws/aws_cloudwatch_log_metric_filter.rb +++ b/lib/resources/aws/aws_cloudwatch_log_metric_filter.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-cloudwatchlogs' + class AwsCloudwatchLogMetricFilter < Inspec.resource(1) name 'aws_cloudwatch_log_metric_filter' desc 'Verifies individual Cloudwatch Log Metric Filters' diff --git a/lib/resources/aws/aws_config_delivery_channel.rb b/lib/resources/aws/aws_config_delivery_channel.rb index 5ebf420b2..912693f01 100644 --- a/lib/resources/aws/aws_config_delivery_channel.rb +++ b/lib/resources/aws/aws_config_delivery_channel.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-configservice' + class AwsConfigDeliveryChannel < Inspec.resource(1) name 'aws_config_delivery_channel' desc 'Verifies settings for AWS Config Delivery Channel' diff --git a/lib/resources/aws/aws_config_recorder.rb b/lib/resources/aws/aws_config_recorder.rb index 4ebf3b71b..56f794c4a 100644 --- a/lib/resources/aws/aws_config_recorder.rb +++ b/lib/resources/aws/aws_config_recorder.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-configservice' + class AwsConfigurationRecorder < Inspec.resource(1) name 'aws_config_recorder' desc 'Verifies settings for AWS Configuration Recorder' diff --git a/lib/resources/aws/aws_ebs_volume.rb b/lib/resources/aws/aws_ebs_volume.rb index 842183909..85be0439d 100644 --- a/lib/resources/aws/aws_ebs_volume.rb +++ b/lib/resources/aws/aws_ebs_volume.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsEbsVolume < Inspec.resource(1) name 'aws_ebs_volume' desc 'Verifies settings for an EBS volume' diff --git a/lib/resources/aws/aws_ebs_volumes.rb b/lib/resources/aws/aws_ebs_volumes.rb index dca0ff9d8..5fd1c2d5c 100644 --- a/lib/resources/aws/aws_ebs_volumes.rb +++ b/lib/resources/aws/aws_ebs_volumes.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsEbsVolumes < Inspec.resource(1) name 'aws_ebs_volumes' desc 'Verifies settings for AWS EBS Volumes in bulk' diff --git a/lib/resources/aws/aws_ec2_instance.rb b/lib/resources/aws/aws_ec2_instance.rb index e638e3e1a..6539ea09b 100644 --- a/lib/resources/aws/aws_ec2_instance.rb +++ b/lib/resources/aws/aws_ec2_instance.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsEc2Instance < Inspec.resource(1) name 'aws_ec2_instance' desc 'Verifies settings for an EC2 instance' diff --git a/lib/resources/aws/aws_ec2_instances.rb b/lib/resources/aws/aws_ec2_instances.rb index 3f819db95..fa2e64a85 100644 --- a/lib/resources/aws/aws_ec2_instances.rb +++ b/lib/resources/aws/aws_ec2_instances.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsEc2Instances < Inspec.resource(1) name 'aws_ec2_instances' desc 'Verifies settings for AWS EC2 Instances in bulk' diff --git a/lib/resources/aws/aws_ecs_cluster.rb b/lib/resources/aws/aws_ecs_cluster.rb index 0ffdf7e38..cc294562c 100644 --- a/lib/resources/aws/aws_ecs_cluster.rb +++ b/lib/resources/aws/aws_ecs_cluster.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ecs' + class AwsEcsCluster < Inspec.resource(1) name 'aws_ecs_cluster' desc 'Verifies settings for an ECS cluster' diff --git a/lib/resources/aws/aws_eks_cluster.rb b/lib/resources/aws/aws_eks_cluster.rb index 737f50374..e91c5c478 100644 --- a/lib/resources/aws/aws_eks_cluster.rb +++ b/lib/resources/aws/aws_eks_cluster.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-eks' + class AwsEksCluster < Inspec.resource(1) name 'aws_eks_cluster' desc 'Verifies settings for an EKS cluster' diff --git a/lib/resources/aws/aws_elb.rb b/lib/resources/aws/aws_elb.rb index 40d60a6fc..34694d1cd 100644 --- a/lib/resources/aws/aws_elb.rb +++ b/lib/resources/aws/aws_elb.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-elasticloadbalancing' + class AwsElb < Inspec.resource(1) name 'aws_elb' desc 'Verifies settings for AWS Elastic Load Balancer' diff --git a/lib/resources/aws/aws_elbs.rb b/lib/resources/aws/aws_elbs.rb index 34e9299b2..628df1620 100644 --- a/lib/resources/aws/aws_elbs.rb +++ b/lib/resources/aws/aws_elbs.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-elasticloadbalancing' + class AwsElbs < Inspec.resource(1) name 'aws_elbs' desc 'Verifies settings for AWS ELBs (classic Elastic Load Balancers) in bulk' diff --git a/lib/resources/aws/aws_flow_log.rb b/lib/resources/aws/aws_flow_log.rb index b97f97337..43b802a5a 100644 --- a/lib/resources/aws/aws_flow_log.rb +++ b/lib/resources/aws/aws_flow_log.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsFlowLog < Inspec.resource(1) name 'aws_flow_log' supports platform: 'aws' diff --git a/lib/resources/aws/aws_iam_access_key.rb b/lib/resources/aws/aws_iam_access_key.rb index 3b13786ea..eeb7387d2 100644 --- a/lib/resources/aws/aws_iam_access_key.rb +++ b/lib/resources/aws/aws_iam_access_key.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + class AwsIamAccessKey < Inspec.resource(1) name 'aws_iam_access_key' desc 'Verifies settings for an individual IAM access key' diff --git a/lib/resources/aws/aws_iam_access_keys.rb b/lib/resources/aws/aws_iam_access_keys.rb index a25cc0738..81c428a7a 100644 --- a/lib/resources/aws/aws_iam_access_keys.rb +++ b/lib/resources/aws/aws_iam_access_keys.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + class AwsIamAccessKeys < Inspec.resource(1) name 'aws_iam_access_keys' desc 'Verifies settings for AWS IAM Access Keys in bulk' diff --git a/lib/resources/aws/aws_iam_group.rb b/lib/resources/aws/aws_iam_group.rb index e7387bcc7..99c654d75 100644 --- a/lib/resources/aws/aws_iam_group.rb +++ b/lib/resources/aws/aws_iam_group.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + class AwsIamGroup < Inspec.resource(1) name 'aws_iam_group' desc 'Verifies settings for AWS IAM Group' diff --git a/lib/resources/aws/aws_iam_groups.rb b/lib/resources/aws/aws_iam_groups.rb index 2c2ce56ea..ba4d19b4c 100644 --- a/lib/resources/aws/aws_iam_groups.rb +++ b/lib/resources/aws/aws_iam_groups.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + class AwsIamGroups < Inspec.resource(1) name 'aws_iam_groups' desc 'Verifies settings for AWS IAM groups in bulk' diff --git a/lib/resources/aws/aws_iam_password_policy.rb b/lib/resources/aws/aws_iam_password_policy.rb index 82ce5ae62..189275275 100644 --- a/lib/resources/aws/aws_iam_password_policy.rb +++ b/lib/resources/aws/aws_iam_password_policy.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + class AwsIamPasswordPolicy < Inspec.resource(1) name 'aws_iam_password_policy' desc 'Verifies iam password policy' diff --git a/lib/resources/aws/aws_iam_policies.rb b/lib/resources/aws/aws_iam_policies.rb index 7f2ea8ad1..ecf89d3c2 100644 --- a/lib/resources/aws/aws_iam_policies.rb +++ b/lib/resources/aws/aws_iam_policies.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + class AwsIamPolicies < Inspec.resource(1) name 'aws_iam_policies' desc 'Verifies settings for AWS IAM Policies in bulk' diff --git a/lib/resources/aws/aws_iam_policy.rb b/lib/resources/aws/aws_iam_policy.rb index 2fc041194..f7062322b 100644 --- a/lib/resources/aws/aws_iam_policy.rb +++ b/lib/resources/aws/aws_iam_policy.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + require 'json' require 'set' require 'uri' diff --git a/lib/resources/aws/aws_iam_role.rb b/lib/resources/aws/aws_iam_role.rb index 2b29d4224..4dfa8b923 100644 --- a/lib/resources/aws/aws_iam_role.rb +++ b/lib/resources/aws/aws_iam_role.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + class AwsIamRole < Inspec.resource(1) name 'aws_iam_role' desc 'Verifies settings for an IAM Role' diff --git a/lib/resources/aws/aws_iam_root_user.rb b/lib/resources/aws/aws_iam_root_user.rb index c4853082a..b5231be15 100644 --- a/lib/resources/aws/aws_iam_root_user.rb +++ b/lib/resources/aws/aws_iam_root_user.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + class AwsIamRootUser < Inspec.resource(1) name 'aws_iam_root_user' desc 'Verifies settings for AWS root account' diff --git a/lib/resources/aws/aws_iam_user.rb b/lib/resources/aws/aws_iam_user.rb index 161133fab..b817ebf30 100644 --- a/lib/resources/aws/aws_iam_user.rb +++ b/lib/resources/aws/aws_iam_user.rb @@ -1,4 +1,6 @@ -require 'resource_support/aws' +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' class AwsIamUser < Inspec.resource(1) name 'aws_iam_user' diff --git a/lib/resources/aws/aws_iam_users.rb b/lib/resources/aws/aws_iam_users.rb index 4572f3730..adc2f819f 100644 --- a/lib/resources/aws/aws_iam_users.rb +++ b/lib/resources/aws/aws_iam_users.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-iam' + class AwsIamUsers < Inspec.resource(1) name 'aws_iam_users' desc 'Verifies settings for AWS IAM users' diff --git a/lib/resources/aws/aws_kms_key.rb b/lib/resources/aws/aws_kms_key.rb index aeacce9c1..053f47414 100644 --- a/lib/resources/aws/aws_kms_key.rb +++ b/lib/resources/aws/aws_kms_key.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-kms' + class AwsKmsKey < Inspec.resource(1) name 'aws_kms_key' desc 'Verifies settings for an individual AWS KMS Key' diff --git a/lib/resources/aws/aws_kms_keys.rb b/lib/resources/aws/aws_kms_keys.rb index 570d5ada8..6de91650a 100644 --- a/lib/resources/aws/aws_kms_keys.rb +++ b/lib/resources/aws/aws_kms_keys.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-kms' + class AwsKmsKeys < Inspec.resource(1) name 'aws_kms_keys' desc 'Verifies settings for AWS KMS Keys in bulk' diff --git a/lib/resources/aws/aws_rds_instance.rb b/lib/resources/aws/aws_rds_instance.rb index 7db4e765f..26b5a68c9 100644 --- a/lib/resources/aws/aws_rds_instance.rb +++ b/lib/resources/aws/aws_rds_instance.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-rds' + class AwsRdsInstance < Inspec.resource(1) name 'aws_rds_instance' desc 'Verifies settings for an rds instance' diff --git a/lib/resources/aws/aws_route_table.rb b/lib/resources/aws/aws_route_table.rb index 81045166c..d67e1c8e1 100644 --- a/lib/resources/aws/aws_route_table.rb +++ b/lib/resources/aws/aws_route_table.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsRouteTable < Inspec.resource(1) name 'aws_route_table' desc 'Verifies settings for an AWS Route Table' diff --git a/lib/resources/aws/aws_route_tables.rb b/lib/resources/aws/aws_route_tables.rb index 86cabb4e0..6d3a8f213 100644 --- a/lib/resources/aws/aws_route_tables.rb +++ b/lib/resources/aws/aws_route_tables.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsRouteTables < Inspec.resource(1) name 'aws_route_tables' desc 'Verifies settings for AWS Route Tables in bulk' diff --git a/lib/resources/aws/aws_s3_bucket.rb b/lib/resources/aws/aws_s3_bucket.rb index 7d6316b6f..0a851f1f6 100644 --- a/lib/resources/aws/aws_s3_bucket.rb +++ b/lib/resources/aws/aws_s3_bucket.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-s3' + class AwsS3Bucket < Inspec.resource(1) name 'aws_s3_bucket' desc 'Verifies settings for a s3 bucket' diff --git a/lib/resources/aws/aws_s3_bucket_object.rb b/lib/resources/aws/aws_s3_bucket_object.rb index 1a0b5d568..d4c30872d 100644 --- a/lib/resources/aws/aws_s3_bucket_object.rb +++ b/lib/resources/aws/aws_s3_bucket_object.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-s3' + class AwsS3BucketObject < Inspec.resource(1) name 'aws_s3_bucket_object' desc 'Verifies settings for a s3 bucket object' diff --git a/lib/resources/aws/aws_s3_buckets.rb b/lib/resources/aws/aws_s3_buckets.rb index 417adf237..311d6d1a7 100644 --- a/lib/resources/aws/aws_s3_buckets.rb +++ b/lib/resources/aws/aws_s3_buckets.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-s3' + class AwsS3Buckets < Inspec.resource(1) name 'aws_s3_buckets' desc 'Verifies settings for AWS S3 Buckets in bulk' diff --git a/lib/resources/aws/aws_security_group.rb b/lib/resources/aws/aws_security_group.rb index fda46132b..667d3e635 100644 --- a/lib/resources/aws/aws_security_group.rb +++ b/lib/resources/aws/aws_security_group.rb @@ -1,6 +1,10 @@ require 'set' require 'ipaddr' +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsSecurityGroup < Inspec.resource(1) name 'aws_security_group' desc 'Verifies settings for an individual AWS Security Group.' diff --git a/lib/resources/aws/aws_security_groups.rb b/lib/resources/aws/aws_security_groups.rb index 396db9333..f207507f9 100644 --- a/lib/resources/aws/aws_security_groups.rb +++ b/lib/resources/aws/aws_security_groups.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsSecurityGroups < Inspec.resource(1) name 'aws_security_groups' desc 'Verifies settings for AWS Security Groups in bulk' diff --git a/lib/resources/aws/aws_sns_subscription.rb b/lib/resources/aws/aws_sns_subscription.rb index 4bf6852da..b76eed675 100644 --- a/lib/resources/aws/aws_sns_subscription.rb +++ b/lib/resources/aws/aws_sns_subscription.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-sns' + class AwsSnsSubscription < Inspec.resource(1) name 'aws_sns_subscription' desc 'Verifies settings for an SNS Subscription' diff --git a/lib/resources/aws/aws_sns_topic.rb b/lib/resources/aws/aws_sns_topic.rb index 34f70dff2..6097c9f09 100644 --- a/lib/resources/aws/aws_sns_topic.rb +++ b/lib/resources/aws/aws_sns_topic.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-sns' + class AwsSnsTopic < Inspec.resource(1) name 'aws_sns_topic' desc 'Verifies settings for an SNS Topic' diff --git a/lib/resources/aws/aws_sns_topics.rb b/lib/resources/aws/aws_sns_topics.rb index 559f87b10..3565f322e 100644 --- a/lib/resources/aws/aws_sns_topics.rb +++ b/lib/resources/aws/aws_sns_topics.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-sns' + class AwsSnsTopics < Inspec.resource(1) name 'aws_sns_topics' desc 'Verifies settings for SNS Topics in bulk' diff --git a/lib/resources/aws/aws_sqs_queue.rb b/lib/resources/aws/aws_sqs_queue.rb index 3ba76ba5d..cdc60736c 100644 --- a/lib/resources/aws/aws_sqs_queue.rb +++ b/lib/resources/aws/aws_sqs_queue.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-sqs' + require 'uri' class AwsSqsQueue < Inspec.resource(1) diff --git a/lib/resources/aws/aws_subnet.rb b/lib/resources/aws/aws_subnet.rb index fdd841d50..e5279e54a 100644 --- a/lib/resources/aws/aws_subnet.rb +++ b/lib/resources/aws/aws_subnet.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsSubnet < Inspec.resource(1) name 'aws_subnet' desc 'This resource is used to test the attributes of a VPC subnet' diff --git a/lib/resources/aws/aws_subnets.rb b/lib/resources/aws/aws_subnets.rb index 2bda9d045..6750ff498 100644 --- a/lib/resources/aws/aws_subnets.rb +++ b/lib/resources/aws/aws_subnets.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsSubnets < Inspec.resource(1) name 'aws_subnets' desc 'Verifies settings for VPC Subnets in bulk' diff --git a/lib/resources/aws/aws_vpc.rb b/lib/resources/aws/aws_vpc.rb index 17dbd48af..b1d1d85be 100644 --- a/lib/resources/aws/aws_vpc.rb +++ b/lib/resources/aws/aws_vpc.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_singular_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsVpc < Inspec.resource(1) name 'aws_vpc' desc 'Verifies settings for AWS VPC' diff --git a/lib/resources/aws/aws_vpcs.rb b/lib/resources/aws/aws_vpcs.rb index 682b5fe27..887348f74 100644 --- a/lib/resources/aws/aws_vpcs.rb +++ b/lib/resources/aws/aws_vpcs.rb @@ -1,3 +1,7 @@ +require 'resource_support/aws/aws_plural_resource_mixin' +require 'resource_support/aws/aws_backend_base' +require 'aws-sdk-ec2' + class AwsVpcs < Inspec.resource(1) name 'aws_vpcs' desc 'Verifies settings for AWS VPCs in bulk' diff --git a/test/unit/reporters/automate_test.rb b/test/unit/reporters/automate_test.rb index 6f43596e7..fc182e101 100644 --- a/test/unit/reporters/automate_test.rb +++ b/test/unit/reporters/automate_test.rb @@ -1,5 +1,5 @@ - require 'helper' +require 'inspec/reporters' describe Inspec::Reporters::Automate do let(:path) { File.expand_path(File.dirname(__FILE__)) } diff --git a/test/unit/reporters/base_test.rb b/test/unit/reporters/base_test.rb index 1d1806ba9..19e599278 100644 --- a/test/unit/reporters/base_test.rb +++ b/test/unit/reporters/base_test.rb @@ -1,5 +1,5 @@ - require 'helper' +require 'inspec/reporters' describe Inspec::Reporters::Base do let(:path) { File.expand_path(File.dirname(__FILE__)) } diff --git a/test/unit/reporters/cli_test.rb b/test/unit/reporters/cli_test.rb index b205510e3..e185476e6 100644 --- a/test/unit/reporters/cli_test.rb +++ b/test/unit/reporters/cli_test.rb @@ -1,5 +1,5 @@ - require 'helper' +require 'inspec/reporters' describe Inspec::Reporters::CLI do WINDOWS = RUBY_PLATFORM =~ /windows|mswin|msys|mingw|cygwin/ diff --git a/test/unit/reporters/json_automate_test.rb b/test/unit/reporters/json_automate_test.rb index 7555ca4dc..8c4fcaef9 100644 --- a/test/unit/reporters/json_automate_test.rb +++ b/test/unit/reporters/json_automate_test.rb @@ -1,5 +1,5 @@ - require 'helper' +require 'inspec/reporters' describe Inspec::Reporters::JsonAutomate do let(:path) { File.expand_path(File.dirname(__FILE__)) } diff --git a/test/unit/reporters/json_min_test.rb b/test/unit/reporters/json_min_test.rb index 723264495..8da91dcb0 100644 --- a/test/unit/reporters/json_min_test.rb +++ b/test/unit/reporters/json_min_test.rb @@ -1,5 +1,5 @@ - require 'helper' +require 'inspec/reporters' describe Inspec::Reporters::JsonMin do let(:path) { File.expand_path(File.dirname(__FILE__)) } diff --git a/test/unit/reporters/json_test.rb b/test/unit/reporters/json_test.rb index 3092e30b6..8f7038ead 100644 --- a/test/unit/reporters/json_test.rb +++ b/test/unit/reporters/json_test.rb @@ -1,5 +1,5 @@ - require 'helper' +require 'inspec/reporters' describe Inspec::Reporters::Json do let(:path) { File.expand_path(File.dirname(__FILE__)) } diff --git a/test/unit/reporters/junit_test.rb b/test/unit/reporters/junit_test.rb index 6af05ba15..805626b75 100644 --- a/test/unit/reporters/junit_test.rb +++ b/test/unit/reporters/junit_test.rb @@ -1,5 +1,5 @@ - require 'helper' +require 'inspec/reporters' describe Inspec::Reporters::Junit do let(:path) { File.expand_path(File.dirname(__FILE__)) } diff --git a/test/unit/reporters/yaml_test.rb b/test/unit/reporters/yaml_test.rb index a3b41b70d..06477b8e8 100644 --- a/test/unit/reporters/yaml_test.rb +++ b/test/unit/reporters/yaml_test.rb @@ -1,5 +1,5 @@ - require 'helper' +require 'inspec/reporters' describe Inspec::Reporters::Yaml do let(:path) { File.expand_path(File.dirname(__FILE__)) } diff --git a/test/unit/resources/aide_conf_test.rb b/test/unit/resources/aide_conf_test.rb index 658acc49f..2bc4dec74 100644 --- a/test/unit/resources/aide_conf_test.rb +++ b/test/unit/resources/aide_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/aide_conf' describe 'Inspec::Resources::AideConf' do describe 'AideConf Parameters' do diff --git a/test/unit/resources/apache_conf_test.rb b/test/unit/resources/apache_conf_test.rb index ecd590d95..575a6e6fe 100644 --- a/test/unit/resources/apache_conf_test.rb +++ b/test/unit/resources/apache_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/apache_conf' require 'hashie' describe 'Inspec::Resources::ApacheConf' do diff --git a/test/unit/resources/apt_test.rb b/test/unit/resources/apt_test.rb index 4fa6b1ca1..6fd6601a5 100644 --- a/test/unit/resources/apt_test.rb +++ b/test/unit/resources/apt_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/apt' describe 'Inspec::Resources::AptRepo' do diff --git a/test/unit/resources/audit_policy_test.rb b/test/unit/resources/audit_policy_test.rb index 8875567ec..bba127205 100644 --- a/test/unit/resources/audit_policy_test.rb +++ b/test/unit/resources/audit_policy_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/audit_policy' describe 'Inspec::Resources::AuditPolicy' do it 'check audit policy parsing' do diff --git a/test/unit/resources/auditd_conf_test.rb b/test/unit/resources/auditd_conf_test.rb index 1b14f4299..d1dedb970 100644 --- a/test/unit/resources/auditd_conf_test.rb +++ b/test/unit/resources/auditd_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/auditd_conf' describe 'Inspec::Resources::AuditDaemonConf' do it 'check audit daemon config parsing' do diff --git a/test/unit/resources/auditd_test.rb b/test/unit/resources/auditd_test.rb index 50f9d9cf6..6a8904852 100644 --- a/test/unit/resources/auditd_test.rb +++ b/test/unit/resources/auditd_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/auditd' describe 'Inspec::Resources::AuditDaemon' do it 'auditd interface' do diff --git a/test/unit/resources/aws_billing_report_test.rb b/test/unit/resources/aws_billing_report_test.rb index 5ab7f62dd..736d03b2f 100644 --- a/test/unit/resources/aws_billing_report_test.rb +++ b/test/unit/resources/aws_billing_report_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_billing_report' require_relative 'aws_billing_backend' # TODO: move this to mocks diff --git a/test/unit/resources/aws_billing_reports_test.rb b/test/unit/resources/aws_billing_reports_test.rb index 8ca524fa6..8f36e8ca4 100644 --- a/test/unit/resources/aws_billing_reports_test.rb +++ b/test/unit/resources/aws_billing_reports_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_billing_reports' require_relative 'aws_billing_backend' diff --git a/test/unit/resources/aws_cloudtrail_trail_test.rb b/test/unit/resources/aws_cloudtrail_trail_test.rb index 9831f1127..065d08d41 100644 --- a/test/unit/resources/aws_cloudtrail_trail_test.rb +++ b/test/unit/resources/aws_cloudtrail_trail_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_cloudtrail_trail' require 'resource_support/aws' require 'resources/aws/aws_cloudtrail_trail' diff --git a/test/unit/resources/aws_cloudtrail_trails_test.rb b/test/unit/resources/aws_cloudtrail_trails_test.rb index 1faeb2725..97a03333f 100644 --- a/test/unit/resources/aws_cloudtrail_trails_test.rb +++ b/test/unit/resources/aws_cloudtrail_trails_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_cloudtrail_trails' require 'resource_support/aws' require 'resources/aws/aws_cloudtrail_trails' diff --git a/test/unit/resources/aws_cloudwatch_alarm_test.rb b/test/unit/resources/aws_cloudwatch_alarm_test.rb index a30f26092..169d0946d 100644 --- a/test/unit/resources/aws_cloudwatch_alarm_test.rb +++ b/test/unit/resources/aws_cloudwatch_alarm_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_cloudwatch_alarm' require 'resource_support/aws' require 'resources/aws/aws_cloudwatch_alarm' diff --git a/test/unit/resources/aws_cloudwatch_log_metric_filter_test.rb b/test/unit/resources/aws_cloudwatch_log_metric_filter_test.rb index ac2920486..2e87723b2 100644 --- a/test/unit/resources/aws_cloudwatch_log_metric_filter_test.rb +++ b/test/unit/resources/aws_cloudwatch_log_metric_filter_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_cloudwatch_log_metric_filter' require 'resource_support/aws' require 'resources/aws/aws_cloudwatch_log_metric_filter' diff --git a/test/unit/resources/aws_config_delivery_channel_test.rb b/test/unit/resources/aws_config_delivery_channel_test.rb index 23aba2e12..942fc76e0 100644 --- a/test/unit/resources/aws_config_delivery_channel_test.rb +++ b/test/unit/resources/aws_config_delivery_channel_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_config_delivery_channel' require 'resource_support/aws' require 'resources/aws/aws_config_delivery_channel' diff --git a/test/unit/resources/aws_config_recorder_test.rb b/test/unit/resources/aws_config_recorder_test.rb index 8ac8211a3..c47473d19 100644 --- a/test/unit/resources/aws_config_recorder_test.rb +++ b/test/unit/resources/aws_config_recorder_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_config_recorder' require 'resource_support/aws' require 'resources/aws/aws_config_recorder' diff --git a/test/unit/resources/aws_ebs_volume_test.rb b/test/unit/resources/aws_ebs_volume_test.rb index ee0695e61..e16153af8 100644 --- a/test/unit/resources/aws_ebs_volume_test.rb +++ b/test/unit/resources/aws_ebs_volume_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_ebs_volume' require 'resource_support/aws' require 'resources/aws/aws_ebs_volume' diff --git a/test/unit/resources/aws_ebs_volumes_test.rb b/test/unit/resources/aws_ebs_volumes_test.rb index bd14b611b..383a83745 100644 --- a/test/unit/resources/aws_ebs_volumes_test.rb +++ b/test/unit/resources/aws_ebs_volumes_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_ebs_volumes' require 'resource_support/aws' require 'resources/aws/aws_ebs_volumes' diff --git a/test/unit/resources/aws_ec2_instance_test.rb b/test/unit/resources/aws_ec2_instance_test.rb index 25ce7fce8..7dafbf5cd 100644 --- a/test/unit/resources/aws_ec2_instance_test.rb +++ b/test/unit/resources/aws_ec2_instance_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_ec2_instance' require 'resource_support/aws' require 'resources/aws/aws_ec2_instance' diff --git a/test/unit/resources/aws_ec2_instances_test.rb b/test/unit/resources/aws_ec2_instances_test.rb index cdfba44d3..335b72d7f 100644 --- a/test/unit/resources/aws_ec2_instances_test.rb +++ b/test/unit/resources/aws_ec2_instances_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_ec2_instances' require 'resource_support/aws' require 'resources/aws/aws_ec2_instances' diff --git a/test/unit/resources/aws_ecs_cluster_test.rb b/test/unit/resources/aws_ecs_cluster_test.rb index 6007cd3eb..feeecf6bf 100644 --- a/test/unit/resources/aws_ecs_cluster_test.rb +++ b/test/unit/resources/aws_ecs_cluster_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_ecs_cluster' require 'resource_support/aws' require 'resources/aws/aws_ecs_cluster' diff --git a/test/unit/resources/aws_eks_cluster_test.rb b/test/unit/resources/aws_eks_cluster_test.rb index 025060606..7554b313c 100644 --- a/test/unit/resources/aws_eks_cluster_test.rb +++ b/test/unit/resources/aws_eks_cluster_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_eks_cluster' require 'resource_support/aws' require 'resources/aws/aws_eks_cluster' diff --git a/test/unit/resources/aws_elb_test.rb b/test/unit/resources/aws_elb_test.rb index 59a3a0d73..0379618a7 100644 --- a/test/unit/resources/aws_elb_test.rb +++ b/test/unit/resources/aws_elb_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_elb' require 'resource_support/aws' require 'resources/aws/aws_elb' diff --git a/test/unit/resources/aws_elbs_test.rb b/test/unit/resources/aws_elbs_test.rb index a507218e6..c56462753 100644 --- a/test/unit/resources/aws_elbs_test.rb +++ b/test/unit/resources/aws_elbs_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_elbs' require 'resource_support/aws' require 'resources/aws/aws_elbs' diff --git a/test/unit/resources/aws_flow_log_test.rb b/test/unit/resources/aws_flow_log_test.rb index 379f3c925..b36a58b6f 100644 --- a/test/unit/resources/aws_flow_log_test.rb +++ b/test/unit/resources/aws_flow_log_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_flow_log' require 'resource_support/aws' require 'resources/aws/aws_flow_log' diff --git a/test/unit/resources/aws_iam_access_key_test.rb b/test/unit/resources/aws_iam_access_key_test.rb index 4e223603a..9e60dbbbd 100644 --- a/test/unit/resources/aws_iam_access_key_test.rb +++ b/test/unit/resources/aws_iam_access_key_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_access_key' require 'resource_support/aws' require 'resources/aws/aws_iam_access_key' diff --git a/test/unit/resources/aws_iam_access_keys_test.rb b/test/unit/resources/aws_iam_access_keys_test.rb index ad550e99e..d11364da7 100644 --- a/test/unit/resources/aws_iam_access_keys_test.rb +++ b/test/unit/resources/aws_iam_access_keys_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_access_keys' require 'resource_support/aws' require 'resources/aws/aws_iam_access_keys' diff --git a/test/unit/resources/aws_iam_group_test.rb b/test/unit/resources/aws_iam_group_test.rb index 40297c3b1..dae9ab747 100644 --- a/test/unit/resources/aws_iam_group_test.rb +++ b/test/unit/resources/aws_iam_group_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_group' require 'resource_support/aws' require 'resources/aws/aws_iam_group' diff --git a/test/unit/resources/aws_iam_groups_test.rb b/test/unit/resources/aws_iam_groups_test.rb index 1d7821bf3..6acd082c0 100644 --- a/test/unit/resources/aws_iam_groups_test.rb +++ b/test/unit/resources/aws_iam_groups_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_groups' require 'resource_support/aws' require 'resources/aws/aws_iam_groups' diff --git a/test/unit/resources/aws_iam_password_policy_test.rb b/test/unit/resources/aws_iam_password_policy_test.rb index 0fe006ba4..c301e7a14 100644 --- a/test/unit/resources/aws_iam_password_policy_test.rb +++ b/test/unit/resources/aws_iam_password_policy_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_password_policy' require 'resource_support/aws' require 'resources/aws/aws_iam_password_policy' diff --git a/test/unit/resources/aws_iam_policies_test.rb b/test/unit/resources/aws_iam_policies_test.rb index c7982947d..3651fb97f 100644 --- a/test/unit/resources/aws_iam_policies_test.rb +++ b/test/unit/resources/aws_iam_policies_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_policies' require 'resource_support/aws' require 'resources/aws/aws_iam_policies' diff --git a/test/unit/resources/aws_iam_policy_test.rb b/test/unit/resources/aws_iam_policy_test.rb index c1039e917..2b7e4aaa3 100644 --- a/test/unit/resources/aws_iam_policy_test.rb +++ b/test/unit/resources/aws_iam_policy_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_policy' require 'resource_support/aws' require 'resources/aws/aws_iam_policy' diff --git a/test/unit/resources/aws_iam_role_test.rb b/test/unit/resources/aws_iam_role_test.rb index 710064afa..975bb67af 100644 --- a/test/unit/resources/aws_iam_role_test.rb +++ b/test/unit/resources/aws_iam_role_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_role' require 'resource_support/aws' require 'resources/aws/aws_iam_role' diff --git a/test/unit/resources/aws_iam_root_user_test.rb b/test/unit/resources/aws_iam_root_user_test.rb index 83d481750..1dba746e5 100644 --- a/test/unit/resources/aws_iam_root_user_test.rb +++ b/test/unit/resources/aws_iam_root_user_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_root_user' require 'resource_support/aws' require 'resources/aws/aws_iam_root_user' diff --git a/test/unit/resources/aws_iam_user_test.rb b/test/unit/resources/aws_iam_user_test.rb index fcaa5c7be..cb6956a7c 100644 --- a/test/unit/resources/aws_iam_user_test.rb +++ b/test/unit/resources/aws_iam_user_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_user' require 'resource_support/aws' require 'resources/aws/aws_iam_user' diff --git a/test/unit/resources/aws_iam_users_test.rb b/test/unit/resources/aws_iam_users_test.rb index 1454a0307..bb9f02206 100644 --- a/test/unit/resources/aws_iam_users_test.rb +++ b/test/unit/resources/aws_iam_users_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_iam_users' require 'resource_support/aws' require 'resources/aws/aws_iam_users' diff --git a/test/unit/resources/aws_kms_key_test.rb b/test/unit/resources/aws_kms_key_test.rb index d671a75dc..ae31dcd49 100644 --- a/test/unit/resources/aws_kms_key_test.rb +++ b/test/unit/resources/aws_kms_key_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_kms_key' require 'resource_support/aws' require 'resources/aws/aws_kms_key' diff --git a/test/unit/resources/aws_kms_keys_test.rb b/test/unit/resources/aws_kms_keys_test.rb index cf9bf8760..33524d183 100644 --- a/test/unit/resources/aws_kms_keys_test.rb +++ b/test/unit/resources/aws_kms_keys_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_kms_keys' require 'resource_support/aws' require 'resources/aws/aws_kms_keys' diff --git a/test/unit/resources/aws_rds_instance_test.rb b/test/unit/resources/aws_rds_instance_test.rb index 2d1b29864..f6788867b 100644 --- a/test/unit/resources/aws_rds_instance_test.rb +++ b/test/unit/resources/aws_rds_instance_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_rds_instance' require 'resource_support/aws' require 'resources/aws/aws_rds_instance' diff --git a/test/unit/resources/aws_route_table_test.rb b/test/unit/resources/aws_route_table_test.rb index 656d28d26..604c5d5b9 100644 --- a/test/unit/resources/aws_route_table_test.rb +++ b/test/unit/resources/aws_route_table_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_route_table' require 'resource_support/aws' require 'resources/aws/aws_route_table' diff --git a/test/unit/resources/aws_route_tables_test.rb b/test/unit/resources/aws_route_tables_test.rb index 366cb5c39..fedfd6c91 100644 --- a/test/unit/resources/aws_route_tables_test.rb +++ b/test/unit/resources/aws_route_tables_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_route_tables' require 'resource_support/aws' require 'resources/aws/aws_route_tables' diff --git a/test/unit/resources/aws_s3_bucket_object_test.rb b/test/unit/resources/aws_s3_bucket_object_test.rb index 6dd79f895..b360058a5 100644 --- a/test/unit/resources/aws_s3_bucket_object_test.rb +++ b/test/unit/resources/aws_s3_bucket_object_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_s3_bucket_object' require 'resource_support/aws' require 'resources/aws/aws_s3_bucket_object' diff --git a/test/unit/resources/aws_s3_bucket_test.rb b/test/unit/resources/aws_s3_bucket_test.rb index 796cba353..d9ad5db39 100644 --- a/test/unit/resources/aws_s3_bucket_test.rb +++ b/test/unit/resources/aws_s3_bucket_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_s3_bucket' require 'resource_support/aws' require 'resources/aws/aws_s3_bucket' diff --git a/test/unit/resources/aws_s3_buckets_test.rb b/test/unit/resources/aws_s3_buckets_test.rb index 49caedf2a..4d93bffc4 100644 --- a/test/unit/resources/aws_s3_buckets_test.rb +++ b/test/unit/resources/aws_s3_buckets_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_s3_buckets' require 'resource_support/aws' require 'resources/aws/aws_s3_buckets' diff --git a/test/unit/resources/aws_security_group_test.rb b/test/unit/resources/aws_security_group_test.rb index 567ebaec7..59fe536d6 100644 --- a/test/unit/resources/aws_security_group_test.rb +++ b/test/unit/resources/aws_security_group_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_security_group' require 'resource_support/aws' require 'resources/aws/aws_security_group' diff --git a/test/unit/resources/aws_security_groups_test.rb b/test/unit/resources/aws_security_groups_test.rb index cbe0b0500..88500c6a8 100644 --- a/test/unit/resources/aws_security_groups_test.rb +++ b/test/unit/resources/aws_security_groups_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_security_groups' require 'resource_support/aws' require 'resources/aws/aws_security_groups' diff --git a/test/unit/resources/aws_sns_subscription_test.rb b/test/unit/resources/aws_sns_subscription_test.rb index 787d22b20..7a1a268d6 100644 --- a/test/unit/resources/aws_sns_subscription_test.rb +++ b/test/unit/resources/aws_sns_subscription_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_sns_subscription' require 'resource_support/aws' require 'resources/aws/aws_sns_subscription' diff --git a/test/unit/resources/aws_sns_topic_test.rb b/test/unit/resources/aws_sns_topic_test.rb index 3da5c898c..c7c4f8d83 100644 --- a/test/unit/resources/aws_sns_topic_test.rb +++ b/test/unit/resources/aws_sns_topic_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_sns_topic' require 'resource_support/aws' require 'resources/aws/aws_sns_topic' diff --git a/test/unit/resources/aws_sns_topics_test.rb b/test/unit/resources/aws_sns_topics_test.rb index 652e6c021..29b5ce1bc 100644 --- a/test/unit/resources/aws_sns_topics_test.rb +++ b/test/unit/resources/aws_sns_topics_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_sns_topics' require 'resource_support/aws' require 'resources/aws/aws_sns_topics' diff --git a/test/unit/resources/aws_sqs_queue_test.rb b/test/unit/resources/aws_sqs_queue_test.rb index 93ec4c0b4..fa44117f5 100644 --- a/test/unit/resources/aws_sqs_queue_test.rb +++ b/test/unit/resources/aws_sqs_queue_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_sqs_queue' require 'resource_support/aws' require 'resources/aws/aws_sqs_queue' diff --git a/test/unit/resources/aws_subnet_test.rb b/test/unit/resources/aws_subnet_test.rb index 2a7d343ad..07158c7af 100644 --- a/test/unit/resources/aws_subnet_test.rb +++ b/test/unit/resources/aws_subnet_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_subnet' require 'resource_support/aws' require 'resources/aws/aws_subnet' diff --git a/test/unit/resources/aws_subnets_test.rb b/test/unit/resources/aws_subnets_test.rb index e653e541c..f1a10f7b1 100644 --- a/test/unit/resources/aws_subnets_test.rb +++ b/test/unit/resources/aws_subnets_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_subnets' require 'resource_support/aws' require 'resources/aws/aws_subnets' diff --git a/test/unit/resources/aws_vpc_test.rb b/test/unit/resources/aws_vpc_test.rb index 5b461b0f0..84f6afcae 100644 --- a/test/unit/resources/aws_vpc_test.rb +++ b/test/unit/resources/aws_vpc_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_vpc' require 'resource_support/aws' require 'resources/aws/aws_vpc' diff --git a/test/unit/resources/aws_vpcs_test.rb b/test/unit/resources/aws_vpcs_test.rb index 342557161..d1f9414e3 100644 --- a/test/unit/resources/aws_vpcs_test.rb +++ b/test/unit/resources/aws_vpcs_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'resources/aws/aws_vpcs' require 'ipaddr' require 'resource_support/aws' diff --git a/test/unit/resources/bash_test.rb b/test/unit/resources/bash_test.rb index 5f766e6e4..ecdcae4a6 100644 --- a/test/unit/resources/bash_test.rb +++ b/test/unit/resources/bash_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/bash' describe "Inspec::Resources::Bash" do let(:x) { rand.to_s } diff --git a/test/unit/resources/bond_test.rb b/test/unit/resources/bond_test.rb index f5e618464..f8f46dbc6 100644 --- a/test/unit/resources/bond_test.rb +++ b/test/unit/resources/bond_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/bond' describe 'Inspec::Resources::Bond' do diff --git a/test/unit/resources/bridge_test.rb b/test/unit/resources/bridge_test.rb index 11875f603..575822cb8 100644 --- a/test/unit/resources/bridge_test.rb +++ b/test/unit/resources/bridge_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/bridge' describe 'Inspec::Resources::Bridge' do diff --git a/test/unit/resources/chocolatey_package_test.rb b/test/unit/resources/chocolatey_package_test.rb index 8d5edb9f5..e69b4bea8 100644 --- a/test/unit/resources/chocolatey_package_test.rb +++ b/test/unit/resources/chocolatey_package_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/chocolatey_package' def skip(*args) # noop diff --git a/test/unit/resources/command_test.rb b/test/unit/resources/command_test.rb index 304a919ee..843c2f12b 100644 --- a/test/unit/resources/command_test.rb +++ b/test/unit/resources/command_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/command' describe Inspec::Resources::Cmd do let(:x) { rand.to_s } diff --git a/test/unit/resources/cpan_test.rb b/test/unit/resources/cpan_test.rb index 3e9f2dfc6..a825a13e3 100644 --- a/test/unit/resources/cpan_test.rb +++ b/test/unit/resources/cpan_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/cpan' describe 'Inspec::Resources::Cpan' do it 'verify cpan package detail parsing' do diff --git a/test/unit/resources/cran_test.rb b/test/unit/resources/cran_test.rb index c712d6c69..26c54e737 100644 --- a/test/unit/resources/cran_test.rb +++ b/test/unit/resources/cran_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/cran' describe 'Inspec::Resources::Cran' do it 'verify cran package detail parsing' do diff --git a/test/unit/resources/crontab_test.rb b/test/unit/resources/crontab_test.rb index 69d2912cb..3684c5254 100644 --- a/test/unit/resources/crontab_test.rb +++ b/test/unit/resources/crontab_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/crontab' describe 'Inspec::Resources::Crontab' do let(:crontab) { load_resource('crontab') } diff --git a/test/unit/resources/csv_test.rb b/test/unit/resources/csv_test.rb index b0478cdf5..cdb77581f 100644 --- a/test/unit/resources/csv_test.rb +++ b/test/unit/resources/csv_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/csv' describe 'Inspec::Resources::CSV' do describe 'when loading a valid csv' do diff --git a/test/unit/resources/dh_params_test.rb b/test/unit/resources/dh_params_test.rb index e3b7f5032..fe52f998d 100644 --- a/test/unit/resources/dh_params_test.rb +++ b/test/unit/resources/dh_params_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/dh_params' describe 'Inspec::Resources::DhParams' do let (:resource_dh_params) { load_resource('dh_params', 'dh_params.dh_pem')} diff --git a/test/unit/resources/docker_container_test.rb b/test/unit/resources/docker_container_test.rb index 24cbfa3c6..7fd146928 100644 --- a/test/unit/resources/docker_container_test.rb +++ b/test/unit/resources/docker_container_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/docker_container' describe 'Inspec::Resources::DockerContainer' do describe 'docker_container' do diff --git a/test/unit/resources/docker_image_test.rb b/test/unit/resources/docker_image_test.rb index 20ba1886f..35c4a597e 100644 --- a/test/unit/resources/docker_image_test.rb +++ b/test/unit/resources/docker_image_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/docker_image' describe 'Inspec::Resources::DockerImage' do describe 'docker_image' do diff --git a/test/unit/resources/docker_plugin_test.rb b/test/unit/resources/docker_plugin_test.rb index abbe35c37..3b526f611 100644 --- a/test/unit/resources/docker_plugin_test.rb +++ b/test/unit/resources/docker_plugin_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/docker_plugin' describe 'Inspec::Resources::DockerContainer' do describe 'docker_plugin' do diff --git a/test/unit/resources/docker_service_test.rb b/test/unit/resources/docker_service_test.rb index a797988c6..3bebe7a32 100644 --- a/test/unit/resources/docker_service_test.rb +++ b/test/unit/resources/docker_service_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/docker_service' describe 'Inspec::Resources::DockerService' do describe 'docker_service' do diff --git a/test/unit/resources/docker_test.rb b/test/unit/resources/docker_test.rb index 65a791dc9..36235a8ca 100644 --- a/test/unit/resources/docker_test.rb +++ b/test/unit/resources/docker_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/docker' describe 'Inspec::Resources::Docker' do describe 'docker' do diff --git a/test/unit/resources/elasticsearch_test.rb b/test/unit/resources/elasticsearch_test.rb index daf91214c..35c276bfb 100644 --- a/test/unit/resources/elasticsearch_test.rb +++ b/test/unit/resources/elasticsearch_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/elasticsearch' describe 'Inspec::Resources::Elasticsearch' do let(:resource) { load_resource('elasticsearch') } diff --git a/test/unit/resources/etc_fstab_test.rb b/test/unit/resources/etc_fstab_test.rb index 578997682..f9735a836 100644 --- a/test/unit/resources/etc_fstab_test.rb +++ b/test/unit/resources/etc_fstab_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/etc_fstab' describe 'Inspec::Resources::Fstab' do let(:resource) { load_resource('etc_fstab') } diff --git a/test/unit/resources/etc_group_test.rb b/test/unit/resources/etc_group_test.rb index ed4ad1f3e..5ca08faf7 100644 --- a/test/unit/resources/etc_group_test.rb +++ b/test/unit/resources/etc_group_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/etc_group' describe 'Inspec::Resources::EtcGroup' do let(:resource) { load_resource('etc_group') } diff --git a/test/unit/resources/etc_hosts_allow_deny_test.rb b/test/unit/resources/etc_hosts_allow_deny_test.rb index 73607cb3c..8da60134a 100644 --- a/test/unit/resources/etc_hosts_allow_deny_test.rb +++ b/test/unit/resources/etc_hosts_allow_deny_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/etc_hosts_allow_deny' describe 'Inspec::Resources::EtcHostsAllow' do describe 'EtcHostsAllow Paramaters' do diff --git a/test/unit/resources/etc_hosts_test.rb b/test/unit/resources/etc_hosts_test.rb index 39942d086..f42a5357d 100644 --- a/test/unit/resources/etc_hosts_test.rb +++ b/test/unit/resources/etc_hosts_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/etc_hosts' describe 'Inspec::Resources::EtcHosts' do let(:resource) { load_resource('etc_hosts') } diff --git a/test/unit/resources/file_test.rb b/test/unit/resources/file_test.rb index 73e874918..d6bb7ac84 100644 --- a/test/unit/resources/file_test.rb +++ b/test/unit/resources/file_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/file' describe Inspec::Resources::FileResource do let(:file) { stub(unix_mode_mask: 000, mode: 000) } diff --git a/test/unit/resources/filesystem_test.rb b/test/unit/resources/filesystem_test.rb index b58f25b8a..643b1e878 100644 --- a/test/unit/resources/filesystem_test.rb +++ b/test/unit/resources/filesystem_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/filesystem' describe 'Inspec::Resources::FileSystemResource' do # arch linux diff --git a/test/unit/resources/firewalld_test.rb b/test/unit/resources/firewalld_test.rb index 144aa1492..38ba5e7d1 100644 --- a/test/unit/resources/firewalld_test.rb +++ b/test/unit/resources/firewalld_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/firewalld' describe 'Inspec::Resources::FirewallD' do centResource = MockLoader.new(:centos7).load_resource('firewalld') diff --git a/test/unit/resources/gem_test.rb b/test/unit/resources/gem_test.rb index e0576bb4f..13603eac8 100644 --- a/test/unit/resources/gem_test.rb +++ b/test/unit/resources/gem_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/gem' describe 'Inspec::Resources::Gem' do it 'verify gem is not installed' do diff --git a/test/unit/resources/group_test.rb b/test/unit/resources/group_test.rb index 0dfdaaff8..cb11bc01f 100644 --- a/test/unit/resources/group_test.rb +++ b/test/unit/resources/group_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/groups' describe 'Inspec::Resources::Group' do diff --git a/test/unit/resources/groups_test.rb b/test/unit/resources/groups_test.rb index 621fe3399..4295d3659 100644 --- a/test/unit/resources/groups_test.rb +++ b/test/unit/resources/groups_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/groups' describe 'groups resource on unix platform' do let(:resource) { MockLoader.new(:ubuntu1404).load_resource('groups') } diff --git a/test/unit/resources/grub_conf_test.rb b/test/unit/resources/grub_conf_test.rb index 4c5f32686..af97feace 100644 --- a/test/unit/resources/grub_conf_test.rb +++ b/test/unit/resources/grub_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/grub_conf' describe 'Inspec::Resources::GrubConfig' do diff --git a/test/unit/resources/host_test.rb b/test/unit/resources/host_test.rb index b78b3e077..0198a156b 100644 --- a/test/unit/resources/host_test.rb +++ b/test/unit/resources/host_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/host' describe 'Inspec::Resources::Host' do diff --git a/test/unit/resources/http_test.rb b/test/unit/resources/http_test.rb index 3a41ad6bb..744fbdd5a 100644 --- a/test/unit/resources/http_test.rb +++ b/test/unit/resources/http_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/http' require "faraday_middleware/response/follow_redirects" describe 'Inspec::Resources::Http' do diff --git a/test/unit/resources/iis_app_pool_test.rb b/test/unit/resources/iis_app_pool_test.rb index 785bd0320..e178c8307 100644 --- a/test/unit/resources/iis_app_pool_test.rb +++ b/test/unit/resources/iis_app_pool_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/iis_app_pool' describe 'Inspec::Resources::IisAppPool' do it 'verify default app pool settings' do diff --git a/test/unit/resources/iis_site_test.rb b/test/unit/resources/iis_site_test.rb index 35b08738a..0ba97672c 100644 --- a/test/unit/resources/iis_site_test.rb +++ b/test/unit/resources/iis_site_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/iis_site' describe 'Inspec::Resources::IisSite' do it 'verify Default Web Site settings' do diff --git a/test/unit/resources/inetd_conf_test.rb b/test/unit/resources/inetd_conf_test.rb index 4942767ef..4827274e3 100644 --- a/test/unit/resources/inetd_conf_test.rb +++ b/test/unit/resources/inetd_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/inetd_conf' describe 'Inspec::Resources::InetdConf' do it 'verify limits.conf config parsing' do diff --git a/test/unit/resources/ini_test.rb b/test/unit/resources/ini_test.rb index 5d7d5c6d2..3964300be 100644 --- a/test/unit/resources/ini_test.rb +++ b/test/unit/resources/ini_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/ini' describe 'Inspec::Resources::Ini' do diff --git a/test/unit/resources/interface_test.rb b/test/unit/resources/interface_test.rb index 607a73856..ae3d1bff5 100644 --- a/test/unit/resources/interface_test.rb +++ b/test/unit/resources/interface_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/interface' describe 'Inspec::Resources::Interface' do diff --git a/test/unit/resources/iptables_test.rb b/test/unit/resources/iptables_test.rb index 16f7cd7a5..a6cbd3e99 100644 --- a/test/unit/resources/iptables_test.rb +++ b/test/unit/resources/iptables_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/iptables' describe 'Inspec::Resources::Iptables' do diff --git a/test/unit/resources/json_test.rb b/test/unit/resources/json_test.rb index 025de52cb..54e986f12 100644 --- a/test/unit/resources/json_test.rb +++ b/test/unit/resources/json_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/json' describe 'Inspec::Resources::JSON' do describe 'when loading a valid json' do diff --git a/test/unit/resources/kernel_module_test.rb b/test/unit/resources/kernel_module_test.rb index 42dd47a9d..f78706a42 100644 --- a/test/unit/resources/kernel_module_test.rb +++ b/test/unit/resources/kernel_module_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/kernel_module' describe 'Inspec::Resources::KernelModule' do diff --git a/test/unit/resources/kernel_parameter_test.rb b/test/unit/resources/kernel_parameter_test.rb index e0615f4b0..5cd5b4e55 100644 --- a/test/unit/resources/kernel_parameter_test.rb +++ b/test/unit/resources/kernel_parameter_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/kernel_parameter' describe 'Inspec::Resources::KernelParameter' do it 'verify kernel_parameter parsing' do diff --git a/test/unit/resources/key_rsa_test.rb b/test/unit/resources/key_rsa_test.rb index 18f3a79ae..7c3341218 100644 --- a/test/unit/resources/key_rsa_test.rb +++ b/test/unit/resources/key_rsa_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/key_rsa' describe 'Inspec::Resources::RsaKey' do let (:resource_key) { load_resource('key_rsa', 'test_certificate.rsa.key.pem')} diff --git a/test/unit/resources/ksh_test.rb b/test/unit/resources/ksh_test.rb index 8450d85e5..89fc881a7 100644 --- a/test/unit/resources/ksh_test.rb +++ b/test/unit/resources/ksh_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/ksh' describe Inspec::Resources::Ksh do let(:x) { rand.to_s } diff --git a/test/unit/resources/limits_conf_test.rb b/test/unit/resources/limits_conf_test.rb index 9b5646806..b3fd7603f 100644 --- a/test/unit/resources/limits_conf_test.rb +++ b/test/unit/resources/limits_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/limits_conf' describe 'Inspec::Resources::LimitsConf' do it 'verify limits.conf config parsing' do diff --git a/test/unit/resources/login_def_test.rb b/test/unit/resources/login_def_test.rb index afba3b54d..d59f70217 100644 --- a/test/unit/resources/login_def_test.rb +++ b/test/unit/resources/login_def_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/login_defs' # TODO: rename file describe 'Inspec::Resources::LoginDef' do it 'verify login.def config parsing' do diff --git a/test/unit/resources/mount_test.rb b/test/unit/resources/mount_test.rb index 10c682f68..3de04c16a 100644 --- a/test/unit/resources/mount_test.rb +++ b/test/unit/resources/mount_test.rb @@ -1,5 +1,8 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/file' # TODO: rename this test file? +require 'inspec/resources/mount' describe Inspec::Resources::FileResource do let(:root_resource) { load_resource('mount', '/') } diff --git a/test/unit/resources/mssql_session_test.rb b/test/unit/resources/mssql_session_test.rb index bd81d401a..940b24970 100644 --- a/test/unit/resources/mssql_session_test.rb +++ b/test/unit/resources/mssql_session_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/mssql_session' describe 'Inspec::Resources::MssqlSession' do it 'verify default mssql_session configuration' do diff --git a/test/unit/resources/mysql_conf_test.rb b/test/unit/resources/mysql_conf_test.rb index dfbcb1c92..998b6bb71 100644 --- a/test/unit/resources/mysql_conf_test.rb +++ b/test/unit/resources/mysql_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/mysql_conf' describe 'Inspec::Resources::MysqlConf' do it 'verify mysql.conf config parsing' do diff --git a/test/unit/resources/mysql_session_test.rb b/test/unit/resources/mysql_session_test.rb index 7647cb87e..0ddecb1a9 100644 --- a/test/unit/resources/mysql_session_test.rb +++ b/test/unit/resources/mysql_session_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/mysql_session' describe 'Inspec::Resources::MysqlSession' do it 'verify mysql_session escaped login details with single quotes correctly' do diff --git a/test/unit/resources/nginx_conf_test.rb b/test/unit/resources/nginx_conf_test.rb index e00ec90af..a40abf94e 100644 --- a/test/unit/resources/nginx_conf_test.rb +++ b/test/unit/resources/nginx_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/nginx_conf' describe 'Inspec::Resources::NginxConf' do # None of these tests currently work correctly on windows. See the diff --git a/test/unit/resources/nginx_test.rb b/test/unit/resources/nginx_test.rb index 7713cc9cb..703b90b21 100644 --- a/test/unit/resources/nginx_test.rb +++ b/test/unit/resources/nginx_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/nginx' describe 'Inspec::Resources::Nginx' do describe 'NGINX Methods' do diff --git a/test/unit/resources/npm_test.rb b/test/unit/resources/npm_test.rb index 6b87e7072..be8c3d7f6 100644 --- a/test/unit/resources/npm_test.rb +++ b/test/unit/resources/npm_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/npm' describe 'Inspec::Resources::Npm' do it 'verify npm package detail parsing' do diff --git a/test/unit/resources/ntp_conf_test.rb b/test/unit/resources/ntp_conf_test.rb index 76f1c99a9..9ac98bd68 100644 --- a/test/unit/resources/ntp_conf_test.rb +++ b/test/unit/resources/ntp_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/ntp_conf' describe 'Inspec::Resources::NtpConf' do it 'verify ntp config parsing' do diff --git a/test/unit/resources/oneget_test.rb b/test/unit/resources/oneget_test.rb index d53041294..dad344527 100644 --- a/test/unit/resources/oneget_test.rb +++ b/test/unit/resources/oneget_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/oneget' describe 'Inspec::Resources::OneGet' do diff --git a/test/unit/resources/oracledb_session_test.rb b/test/unit/resources/oracledb_session_test.rb index 884549c65..828f6827d 100644 --- a/test/unit/resources/oracledb_session_test.rb +++ b/test/unit/resources/oracledb_session_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/oracledb_session' describe 'Inspec::Resources::OracledbSession' do it 'verify oracledb_session configuration' do diff --git a/test/unit/resources/os_env_test.rb b/test/unit/resources/os_env_test.rb index d19c49224..550c56c9f 100644 --- a/test/unit/resources/os_env_test.rb +++ b/test/unit/resources/os_env_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/os_env' describe 'Inspec::Resources::OsEnv' do it 'verify env parsing' do diff --git a/test/unit/resources/os_test.rb b/test/unit/resources/os_test.rb index 8a476fa88..98435c7f3 100644 --- a/test/unit/resources/os_test.rb +++ b/test/unit/resources/os_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/os' describe 'Inspec::Resources::Os' do it 'verify os parsing on CentOS' do diff --git a/test/unit/resources/package_test.rb b/test/unit/resources/package_test.rb index de02b8538..85aeec3b3 100644 --- a/test/unit/resources/package_test.rb +++ b/test/unit/resources/package_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/package' describe 'Inspec::Resources::Package' do # arch linux diff --git a/test/unit/resources/packages_test.rb b/test/unit/resources/packages_test.rb index 22088e35b..c65879ff8 100644 --- a/test/unit/resources/packages_test.rb +++ b/test/unit/resources/packages_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/packages' describe 'Inspec::Resources::Packages' do it 'verify packages resource' do diff --git a/test/unit/resources/parse_config_test.rb b/test/unit/resources/parse_config_test.rb index 820e906af..a1090332e 100644 --- a/test/unit/resources/parse_config_test.rb +++ b/test/unit/resources/parse_config_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/parse_config' describe 'Inspec::Resources::ParseConfig' do diff --git a/test/unit/resources/passwd_test.rb b/test/unit/resources/passwd_test.rb index 4b5e233ef..574b9fb6d 100644 --- a/test/unit/resources/passwd_test.rb +++ b/test/unit/resources/passwd_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/passwd' describe 'Inspec::Resources::Passwd' do let(:passwd) { load_resource('passwd') } diff --git a/test/unit/resources/pip_test.rb b/test/unit/resources/pip_test.rb index 4b4354136..7ce878430 100644 --- a/test/unit/resources/pip_test.rb +++ b/test/unit/resources/pip_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/pip' describe 'Inspec::Resources::Pip' do it 'verify pip package detail parsing' do diff --git a/test/unit/resources/platform_test.rb b/test/unit/resources/platform_test.rb index df25effe4..f040bbaa0 100644 --- a/test/unit/resources/platform_test.rb +++ b/test/unit/resources/platform_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/platform' describe 'Inspec::Resources::Platform' do let(:resource) { resource = MockLoader.new(:ubuntu1504).load_resource('platform') } diff --git a/test/unit/resources/port_linuxports_test.rb b/test/unit/resources/port_linuxports_test.rb index 19b3ddbc6..25a2e9f25 100644 --- a/test/unit/resources/port_linuxports_test.rb +++ b/test/unit/resources/port_linuxports_test.rb @@ -1,5 +1,7 @@ require 'helper' -require 'utils/parser' +require 'inspec/resource' +require 'inspec/resources/port' +require 'inspec/utils/parser' class TestLinuxPorts < Minitest::Test def setup diff --git a/test/unit/resources/port_test.rb b/test/unit/resources/port_test.rb index f82f27ed8..15f423e16 100644 --- a/test/unit/resources/port_test.rb +++ b/test/unit/resources/port_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/port' describe 'Inspec::Resources::Port' do it 'verify port on Ubuntu 14.04' do diff --git a/test/unit/resources/postgres_conf_test.rb b/test/unit/resources/postgres_conf_test.rb index 315bbbabc..4d9e9b280 100644 --- a/test/unit/resources/postgres_conf_test.rb +++ b/test/unit/resources/postgres_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/postgres_conf' describe 'Inspec::Resources::Postgres' do it 'verify postgresql.conf config parsing of a simple key value' do diff --git a/test/unit/resources/postgres_hba_conf_test.rb b/test/unit/resources/postgres_hba_conf_test.rb index ab2aecaaa..dfde6e106 100644 --- a/test/unit/resources/postgres_hba_conf_test.rb +++ b/test/unit/resources/postgres_hba_conf_test.rb @@ -1,6 +1,8 @@ # copyright: 2017 require 'helper' +require 'inspec/resource' +require 'inspec/resources/postgres_hba_conf' describe 'Inspec::Resources::PGHbaConf' do describe 'PGHbaConf Paramaters' do diff --git a/test/unit/resources/postgres_ident_conf_test.rb b/test/unit/resources/postgres_ident_conf_test.rb index 08e784e63..4deee8bff 100644 --- a/test/unit/resources/postgres_ident_conf_test.rb +++ b/test/unit/resources/postgres_ident_conf_test.rb @@ -1,5 +1,8 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/postgres_ident_conf' +require 'inspec/resources/directory' describe 'Inspec::Resources::PGIdentConf' do describe 'PGIdentConf Paramaters' do diff --git a/test/unit/resources/postgres_session_test.rb b/test/unit/resources/postgres_session_test.rb index 5a1e999d2..964627a1d 100644 --- a/test/unit/resources/postgres_session_test.rb +++ b/test/unit/resources/postgres_session_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/postgres_session' describe 'Inspec::Resources::PostgresSession' do it 'verify postgres_session create_psql_cmd with a basic query' do diff --git a/test/unit/resources/powershell_test.rb b/test/unit/resources/powershell_test.rb index 2a1a7557e..e2b65bda4 100644 --- a/test/unit/resources/powershell_test.rb +++ b/test/unit/resources/powershell_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/powershell' describe 'Inspec::Resources::Powershell' do let(:base64_command) { diff --git a/test/unit/resources/processes_test.rb b/test/unit/resources/processes_test.rb index dd9b8d5a2..ccbd26783 100644 --- a/test/unit/resources/processes_test.rb +++ b/test/unit/resources/processes_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/processes' describe 'Inspec::Resources::Processes' do it 'handles empty process results' do diff --git a/test/unit/resources/rabbitmq_conf_test.rb b/test/unit/resources/rabbitmq_conf_test.rb index 501bad531..d9f17b511 100644 --- a/test/unit/resources/rabbitmq_conf_test.rb +++ b/test/unit/resources/rabbitmq_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/rabbitmq_config' describe 'Inspec::Resources::RabbitmqConf' do diff --git a/test/unit/resources/registry_key_test.rb b/test/unit/resources/registry_key_test.rb index 740aba142..fcf8e2ad2 100644 --- a/test/unit/resources/registry_key_test.rb +++ b/test/unit/resources/registry_key_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/registry_key' describe 'Inspec::Resources::RegistryKey' do it 'read reg key with human readable name' do diff --git a/test/unit/resources/security_identifier_test.rb b/test/unit/resources/security_identifier_test.rb index 5cad530d4..a1a6712c2 100644 --- a/test/unit/resources/security_identifier_test.rb +++ b/test/unit/resources/security_identifier_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/security_identifier' describe 'Inspec::Resources::SecurityIdentifier' do it 'returns a SID for an existing user' do diff --git a/test/unit/resources/security_policy_test.rb b/test/unit/resources/security_policy_test.rb index cf14489dc..bc81e0052 100644 --- a/test/unit/resources/security_policy_test.rb +++ b/test/unit/resources/security_policy_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/security_policy' describe 'Inspec::Resources::SecurityPolicy' do it 'verify processes resource' do diff --git a/test/unit/resources/service_test.rb b/test/unit/resources/service_test.rb index d720ed448..f28837711 100644 --- a/test/unit/resources/service_test.rb +++ b/test/unit/resources/service_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/service' require 'hashie' describe 'Inspec::Resources::Service' do diff --git a/test/unit/resources/shadow_test.rb b/test/unit/resources/shadow_test.rb index 133758e1d..9b524f0d0 100644 --- a/test/unit/resources/shadow_test.rb +++ b/test/unit/resources/shadow_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/shadow' describe 'Inspec::Resources::Shadow' do let(:shadow) { load_resource('shadow') } diff --git a/test/unit/resources/ssh_conf_test.rb b/test/unit/resources/ssh_conf_test.rb index 110f08d81..52de9d781 100644 --- a/test/unit/resources/ssh_conf_test.rb +++ b/test/unit/resources/ssh_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/ssh_config' describe 'Inspec::Resources::SshConfig' do diff --git a/test/unit/resources/ssl_test.rb b/test/unit/resources/ssl_test.rb index 7c5c73849..490b656e0 100644 --- a/test/unit/resources/ssl_test.rb +++ b/test/unit/resources/ssl_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/ssl' require 'sslshake' describe 'Inspec::Resources::SSL' do diff --git a/test/unit/resources/sys_info_test.rb b/test/unit/resources/sys_info_test.rb index 5dc846784..3d01cfe17 100644 --- a/test/unit/resources/sys_info_test.rb +++ b/test/unit/resources/sys_info_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/sys_info' describe 'Inspec::Resources::SysInfo' do describe 'sys_info' do diff --git a/test/unit/resources/toml_test.rb b/test/unit/resources/toml_test.rb index 382de9c7f..c2f671349 100644 --- a/test/unit/resources/toml_test.rb +++ b/test/unit/resources/toml_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/toml' describe 'Inspec::Resources::TOML' do describe 'when loading valid TOML' do diff --git a/test/unit/resources/vbscript_test.rb b/test/unit/resources/vbscript_test.rb index 2b043a28d..e638ec600 100644 --- a/test/unit/resources/vbscript_test.rb +++ b/test/unit/resources/vbscript_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/vbscript' describe 'Inspec::Resources::VbScript' do diff --git a/test/unit/resources/virtualization_test.rb b/test/unit/resources/virtualization_test.rb index 9d2f53137..1ee9b98f0 100644 --- a/test/unit/resources/virtualization_test.rb +++ b/test/unit/resources/virtualization_test.rb @@ -1,5 +1,8 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/file' +require 'inspec/resources/virtualization' describe 'Inspec::Resources::Virtualization' do def mock_proc(mocked_files) diff --git a/test/unit/resources/windows_feature_test.rb b/test/unit/resources/windows_feature_test.rb index e92fde57b..8622f8bd1 100644 --- a/test/unit/resources/windows_feature_test.rb +++ b/test/unit/resources/windows_feature_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/windows_feature' describe 'Inspec::Resources::WindowsFeature' do it 'can retrieve feature info using PowerShell' do diff --git a/test/unit/resources/windows_hotfix_test.rb b/test/unit/resources/windows_hotfix_test.rb index 35577c737..003e4be8e 100644 --- a/test/unit/resources/windows_hotfix_test.rb +++ b/test/unit/resources/windows_hotfix_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/windows_hotfix' describe 'Inspec::Resources::WindowsHotfix' do diff --git a/test/unit/resources/windows_task_test.rb b/test/unit/resources/windows_task_test.rb index 2ba283800..cc2345659 100644 --- a/test/unit/resources/windows_task_test.rb +++ b/test/unit/resources/windows_task_test.rb @@ -1,4 +1,6 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/windows_task' describe 'Inspec::Resources::WindowsTasks' do it 'verify parsing a windows task that does not exist' do diff --git a/test/unit/resources/wmi_test.rb b/test/unit/resources/wmi_test.rb index 6b5c2c859..926d25e36 100644 --- a/test/unit/resources/wmi_test.rb +++ b/test/unit/resources/wmi_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/wmi' describe 'Inspec::Resources::WMI' do diff --git a/test/unit/resources/x509_certificate_test.rb b/test/unit/resources/x509_certificate_test.rb index 7b82abdeb..053a3f8a8 100644 --- a/test/unit/resources/x509_certificate_test.rb +++ b/test/unit/resources/x509_certificate_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/x509_certificate' describe 'Inspec::Resources::X509Certificate' do let (:resource_cert) { diff --git a/test/unit/resources/xinetd_conf_test.rb b/test/unit/resources/xinetd_conf_test.rb index 908779b95..8295352ae 100644 --- a/test/unit/resources/xinetd_conf_test.rb +++ b/test/unit/resources/xinetd_conf_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/xinetd_conf' describe 'Inspec::Resources::XinetdConf' do let(:resource) { load_resource('xinetd_conf') } diff --git a/test/unit/resources/xml_test.rb b/test/unit/resources/xml_test.rb index 46b4b642b..f469b352c 100644 --- a/test/unit/resources/xml_test.rb +++ b/test/unit/resources/xml_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/xml' require 'rexml/document' describe 'Inspec::Resources::XML' do diff --git a/test/unit/resources/yaml_test.rb b/test/unit/resources/yaml_test.rb index 51dbeca4a..1e6b294eb 100644 --- a/test/unit/resources/yaml_test.rb +++ b/test/unit/resources/yaml_test.rb @@ -2,6 +2,8 @@ require 'helper' require 'inspec/resource' require 'inspec/resources/yaml' +require 'inspec/resource' +require 'inspec/resources/yaml' describe 'Inspec::Resources::YAML' do describe 'when loading a valid yaml' do diff --git a/test/unit/resources/yum_test.rb b/test/unit/resources/yum_test.rb index 350dbc2a9..7bcf54a00 100644 --- a/test/unit/resources/yum_test.rb +++ b/test/unit/resources/yum_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/yum' describe 'Inspec::Resources::YumRepo' do it 'get repository details' do diff --git a/test/unit/resources/zfs_dataset_test.rb b/test/unit/resources/zfs_dataset_test.rb index 0868b4d4d..dc8292156 100644 --- a/test/unit/resources/zfs_dataset_test.rb +++ b/test/unit/resources/zfs_dataset_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/zfs_dataset' describe Inspec::Resources::ZfsDataset do let(:loader) { MockLoader.new(:freebsd10) } diff --git a/test/unit/resources/zfs_pool_test.rb b/test/unit/resources/zfs_pool_test.rb index e438b92ab..233012ee1 100644 --- a/test/unit/resources/zfs_pool_test.rb +++ b/test/unit/resources/zfs_pool_test.rb @@ -1,5 +1,7 @@ require 'helper' +require 'inspec/resource' +require 'inspec/resources/zfs_pool' describe Inspec::Resources::ZfsPool do let(:loader) { MockLoader.new(:freebsd10) }