mirror of
https://github.com/inspec/inspec
synced 2024-11-22 12:43:07 +00:00
Merge pull request #6161 from inspec/nm/build-issues
Fixes for Buildkite Issues
This commit is contained in:
commit
adaff04db3
5 changed files with 6 additions and 5 deletions
2
Gemfile
2
Gemfile
|
@ -29,7 +29,7 @@ group :test do
|
|||
gem "json_schemer", ">= 0.2.1", "< 0.2.19"
|
||||
gem "m"
|
||||
gem "minitest-sprint", "~> 1.0"
|
||||
gem "minitest", "~> 5.5"
|
||||
gem "minitest", "5.15.0"
|
||||
gem "mocha", "~> 1.1"
|
||||
gem "nokogiri", "~> 1.9"
|
||||
gem "pry-byebug"
|
||||
|
|
|
@ -227,7 +227,7 @@ class MockLoader
|
|||
'sh -c \'type "/sbin/auditctl"\'' => empty.call,
|
||||
'sh -c \'type "sql"\'' => cmd_exit_1.call,
|
||||
'type "pwsh"' => empty.call,
|
||||
'type "netstat"' => empty.call,
|
||||
'type "/usr/sbin/netstat"' => empty.call,
|
||||
"sh -c 'find /etc/apache2/ports.conf -type l -maxdepth 1'" => empty.call,
|
||||
"sh -c 'find /etc/httpd/conf.d/*.conf -type l -maxdepth 1'" => empty.call,
|
||||
"sh -c 'find /etc/httpd/mods-enabled/*.conf -type l -maxdepth 1'" => empty.call,
|
||||
|
@ -409,6 +409,7 @@ class MockLoader
|
|||
"php -c /etc/php/7.4/cli/php.ini -r 'echo get_cfg_var(\"default_mimetype\");'" => cmd.call("get-cfg-var"),
|
||||
# routing_table
|
||||
"netstat -rn" => cmd.call("netstat-rn-linux"),
|
||||
"/usr/sbin/netstat -rn" => cmd.call("netstat-rn-linux"),
|
||||
%{sh -c 'type "netstat"'} => empty.call,
|
||||
# mocks for be_immutable matcher for file resource
|
||||
"lsattr constantfile.txt" => cmd.call("lsattr-output"),
|
||||
|
|
|
@ -26,7 +26,7 @@ describe Inspec::Resources::Cgroup do
|
|||
|
||||
# undefined
|
||||
it "check carrotking cgroup information on unsupported os" do
|
||||
resource = MockLoader.new("undefined".to_sym).load_resource("cgroup", "carrotking")
|
||||
resource = MockLoader.new("exsi".to_sym).load_resource("cgroup", "carrotking")
|
||||
_(resource.resource_skipped?).must_equal true
|
||||
_(resource.resource_exception_message).must_equal "The `cgroup` resource is not supported on your OS yet."
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ describe Inspec::Resources::Defaultgateway do
|
|||
|
||||
# unsupported os
|
||||
it "check ipaddress and interface of default gateway on unsupported os" do
|
||||
resource = MockLoader.new("undefined".to_sym).load_resource("default_gateway")
|
||||
resource = MockLoader.new("esxi".to_sym).load_resource("default_gateway")
|
||||
_(resource.resource_skipped?).must_equal true
|
||||
_(resource.resource_failed?).must_equal true
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ describe Inspec::Resources::Routingtable do
|
|||
|
||||
# unsupported os
|
||||
it "check routing table information on unsupported os" do
|
||||
resource = MockLoader.new("undefined".to_sym).load_resource("routing_table")
|
||||
resource = MockLoader.new("esxi".to_sym).load_resource("routing_table")
|
||||
_(resource.resource_skipped?).must_equal true
|
||||
_(resource.resource_failed?).must_equal true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue