class Kitchen::Transport::Dummy::Connection
TODO: comment
Public Instance Methods
download(remotes, local)
click to toggle source
# File lib/kitchen/transport/dummy.rb, line 53 def download(remotes, local) report(:download, "#{remotes.inspect} => #{local}") end
execute(command)
click to toggle source
(see Base#execute)
# File lib/kitchen/transport/dummy.rb, line 42 def execute(command) report(:execute, command) if options[:random_exit_code] != 0 info("Dummy exited (#{exit_code}) for command: [#{command}]") end end
upload(locals, remote)
click to toggle source
# File lib/kitchen/transport/dummy.rb, line 49 def upload(locals, remote) report(:upload, "#{locals.inspect} => #{remote}") end
Private Instance Methods
report(action, msg = "")
click to toggle source
Report what action is taking place, sleeping if so configured, and possibly fail randomly.
@param action [Symbol] the action currently taking place @param state [Hash] the state hash @api private
# File lib/kitchen/transport/dummy.rb, line 65 def report(action, msg = "") what = action.capitalize info("[Dummy] #{what} #{msg} on Transport=Dummy") sleep_if_set debug("[Dummy] #{what} #{msg} completed (#{options[:sleep]}s).") end
sleep_if_set()
click to toggle source
# File lib/kitchen/transport/dummy.rb, line 72 def sleep_if_set sleep(options[:sleep].to_f) if options[:sleep].to_f > 0.0 end