mirror of
https://github.com/inspec/inspec
synced 2024-12-11 22:02:47 +00:00
71057675de
* Allow skipping/failing resources in FilterTable `FilterTable` is commonly used in the class body of a resource and is evaluated during an `instance_eval`. This means that if you raise an exception (e.g. SkipResource) it will halt `inspec exec` and `inspec check`. This adds an `ExceptionCatcher` class that will postpone evaluation until test execution. This allows `inspec check` and `inspec exec` to perform as intended when skipping/failing a resource in `FilterTable` Huge thanks to @adamleff for providing the starting code/ideas! Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com> * Comment why `ExceptionCatcher` doesn't raise Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com> * Remove `accessor` from `ExceptionCatcher` Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com> * Return the existing ExceptionCatcher object rather than creating new Signed-off-by: Adam Leff <adam@leff.co> |
||
---|---|---|
.. | ||
gitfetcher_test.rb | ||
helper.rb | ||
inheritance_test.rb | ||
inspec_archive_test.rb | ||
inspec_artifact_test.rb | ||
inspec_check_test.rb | ||
inspec_compliance_test.rb | ||
inspec_exec_json_test.rb | ||
inspec_exec_jsonmin_test.rb | ||
inspec_exec_junit_test.rb | ||
inspec_exec_test.rb | ||
inspec_json_profile_test.rb | ||
inspec_shell_test.rb | ||
inspec_test.rb | ||
inspec_vendor_test.rb |