From 3781be5316092bf660804c515600629e8caa006a Mon Sep 17 00:00:00 2001 From: Jeffrey Coe Date: Mon, 17 Jun 2019 21:39:38 -0400 Subject: [PATCH] Add docker transport runner options Signed-off-by: Jeffrey Coe --- lib/kitchen/verifier/inspec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/kitchen/verifier/inspec.rb b/lib/kitchen/verifier/inspec.rb index aa33586..3a3c397 100644 --- a/lib/kitchen/verifier/inspec.rb +++ b/lib/kitchen/verifier/inspec.rb @@ -344,6 +344,20 @@ def runner_options_for_dockercli(config_data) logger.debug "Connect to Container: #{opts['host']}" opts end + + # Returns a configuration Hash that can be passed to a `Inspec::Runner`. + # + # @return [Hash] a configuration hash of string-based keys + # @api private + def runner_options_for_docker(config_data) + opts = { + 'backend' => 'docker', + 'logger' => logger, + 'host' => config_data[:container_id], + } + logger.debug "Connect to Container: #{opts['host']}" + opts + end end end end