Class: Kitchen::Verifier::Inspec
- Inherits:
-
Base
- Object
- Base
- Kitchen::Verifier::Inspec
- Defined in:
- lib/kitchen/verifier/inspec.rb
Overview
InSpec verifier for Kitchen.
Instance Method Summary collapse
Instance Method Details
#call(state) ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/kitchen/verifier/inspec.rb', line 37 def call(state) tests = helper_files + local_suite_files runner = ::Inspec::Runner.new((instance.transport, state)) runner.add_tests(tests) debug("Running specs from: #{tests.inspect}") exit_code = runner.run return if exit_code == 0 fail ActionFailed, "Inspec Runner returns #{exit_code}" end |