Class: Kitchen::Verifier::Inspec

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

Instance Method Summary collapse

Instance Method Details

#runner_options_for_lxd(config_data) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/kitchen/verifier/inspec-lxd.rb', line 5

def runner_options_for_lxd(config_data)
  require "train/lxd"
  return config_data.select { |k, _| [:config, :container_name, :username].include? k }.tap do |data|
    data[:backend] = "lxd"
    data[:logger] = logger
  end
rescue LoadError
  raise "The `train-lxd` gem is required to run inspec for this container.  Is it installed?"
end