Address linting mistakes.

Signed-off-by: James Stocks <jstocks@chef.io>
This commit is contained in:
James Stocks 2020-07-01 15:18:18 +01:00
parent fd4c501c70
commit 08398cc3c1
3 changed files with 5 additions and 5 deletions

View file

@ -265,7 +265,7 @@ module Inspec
metadata.dependencies[i][:status] = "skipped"
msg = "Skipping profile: '#{d.name}' on unsupported platform: '#{d.backend.platform.name}/#{d.backend.platform.release}'."
metadata.dependencies[i][:status_message] = msg
metadata.dependencies[i][:skip_message] = msg # Repeat as skip_message for backward compatibility
metadata.dependencies[i][:skip_message] = msg # Repeat as skip_message for backward compatibility
next
elsif metadata.dependencies[i]
# Currently wrapper profiles will load all dependencies, and then we

View file

@ -69,7 +69,7 @@ module Inspec::Reporters
}.reject { |_k, v| v.nil? }
# For backwards compatibility
res[:skip_message] = res[:status_message] if res[:status] == 'skipped'
res[:skip_message] = res[:status_message] if res[:status] == "skipped"
res
end

View file

@ -159,8 +159,8 @@ describe "inspec exec with json formatter" do
data = JSON.parse(out.stdout)
_(data["profiles"].length).must_equal 2
good_profile_result = data["profiles"].select{ |p| p["name"] == "basic_profile" }.first
bad_profile_result = data["profiles"].select{ |p| p["name"] == "raise_outside_control" }.first
good_profile_result = data["profiles"].select { |p| p["name"] == "basic_profile" }.first
bad_profile_result = data["profiles"].select { |p| p["name"] == "raise_outside_control" }.first
_(good_profile_result["status"]).must_equal "loaded"
_(good_profile_result["controls"].first["results"].first["status"]).must_equal "passed"
_(bad_profile_result["status"]).must_equal "failed"
@ -206,7 +206,7 @@ describe "inspec exec with json formatter" do
"supports" => [{ "platform-family" => "unix" }, { "platform-family" => "windows" }],
"attributes" => [],
"status" => "loaded",
"status_message"=>"",
"status_message" => "",
})
_(groups.sort_by { |x| x["id"] }).must_equal([