class Kitchen::Verifier::Base
Public Instance Methods
call(state)
click to toggle source
# File lib/kitchen/helpers.rb, line 340 def call(state) create_sandbox instance.transport.connection(state) do |conn| conn.execute(install_command) unless state[:data_container].nil? conn.execute(init_command) info("Transferring files to #{instance.to_str}") conn.upload(sandbox_dirs, config[:root_path]) debug("Transfer complete") end conn.execute(prepare_command) conn.execute(run_command) end rescue Kitchen::Transport::TransportFailed => ex raise ActionFailed, ex.message end
create_sandbox()
click to toggle source
# File lib/kitchen/helpers.rb, line 324 def create_sandbox info("Creating kitchen sandbox in #{sandbox_path}") unless ::Dir.exist?(sandbox_path) FileUtils.mkdir_p(sandbox_path, mode: 0o755) end end
instance_name()
click to toggle source
# File lib/kitchen/helpers.rb, line 335 def instance_name prefix = (Digest::SHA2.hexdigest FileUtils.pwd)[0, 10] "#{prefix}-#{instance.name}".downcase end
sandbox_path()
click to toggle source
# File lib/kitchen/helpers.rb, line 331 def sandbox_path "#{Dir.home}/.dokken/verifier_sandbox/#{instance_name}" end