mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
Fixes #5369 the FilterTable::ExceptionCatcher error and now shows exact exception message
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
parent
0a62a6ac3b
commit
9af59c2164
2 changed files with 5 additions and 2 deletions
|
@ -41,9 +41,13 @@ module FilterTable
|
|||
end
|
||||
|
||||
def to_s
|
||||
@original_resource.to_s
|
||||
"#{@original_resource.to_s} (#{@original_exception.message})"
|
||||
end
|
||||
alias inspect to_s
|
||||
|
||||
def to_ary
|
||||
[ to_s ]
|
||||
end
|
||||
end
|
||||
|
||||
class Trace
|
||||
|
|
|
@ -127,7 +127,6 @@ describe "filtertable functional tests" do
|
|||
describe "if control fails" do
|
||||
it "should show the exact error message" do
|
||||
controls = ["exception_catcher_test"]
|
||||
cmd = "exec " + ft_profile_path + " --controls " + controls.join(" ") + " --no-sudo"
|
||||
run_result = run_result_for_controls(controls)
|
||||
outcome_hash = failed_control_test_outcomes(run_result)
|
||||
_(outcome_hash["exception_catcher_test"]).must_include "`tags` for resource is missing"
|
||||
|
|
Loading…
Reference in a new issue