Class: Kitchen::Verifier::Inspec

Inherits:
Base
  • Object
show all
Defined in:
lib/kitchen/verifier/inspec.rb

Overview

InSpec verifier for Kitchen.

Author:

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(runner_options(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