Class: Kitchen::Transport::Dummy::Connection
- Inherits:
-
Base::Connection
- Object
- Base::Connection
- Kitchen::Transport::Dummy::Connection
- Defined in:
- lib/kitchen/transport/dummy.rb
Overview
A connection that reports the actions it would have carried out rather than contacting any remote host.
Instance Method Summary collapse
-
#download(remotes, local) ⇒ void
Reports that the given files would have been downloaded.
-
#execute(command) ⇒ Object
Execute a command on the remote host.
-
#upload(locals, remote) ⇒ void
Reports that the given files would have been uploaded.
Methods inherited from Base::Connection
#close, #execute_with_retry, #initialize, #login_command, #retry?, #wait_until_ready
Methods included from Logging
#banner, #debug, #error, #fatal, #info, #warn
Constructor Details
This class inherits a constructor from Kitchen::Transport::Base::Connection
Instance Method Details
#download(remotes, local) ⇒ void
This method returns an undefined value.
Reports that the given files would have been downloaded.
70 71 72 |
# File 'lib/kitchen/transport/dummy.rb', line 70 def download(remotes, local) report(:download, "#{remotes.inspect} => #{local}") end |
#execute(command) ⇒ Object
Execute a command on the remote host.
49 50 51 52 53 54 |
# File 'lib/kitchen/transport/dummy.rb', line 49 def execute(command) report(:execute, command) if [:random_exit_code] != 0 info("Dummy exited (#{exit_code}) for command: [#{command}]") end end |
#upload(locals, remote) ⇒ void
This method returns an undefined value.
Reports that the given files would have been uploaded.
61 62 63 |
# File 'lib/kitchen/transport/dummy.rb', line 61 def upload(locals, remote) report(:upload, "#{locals.inspect} => #{remote}") end |