Class: Kitchen::Transport::ExpressSsh::Connection
- Inherits:
-
Ssh::Connection
- Object
- Ssh::Connection
- Kitchen::Transport::ExpressSsh::Connection
- Includes:
- Kitchen::Transport::Express::Archiver
- Defined in:
- lib/kitchen/transport/express_ssh.rb
Overview
This connection instance overrides the default behavior of the upload method in Kitchen::Transport::Ssh::Connection to provide the zip-and-ship style transfer of files to the kitchen instances. All other behavior from the superclass is default.
Instance Method Summary collapse
-
#upload(locals, remote) ⇒ Object
Overrides the upload method in Kitchen::Transport::Ssh::Connection The special sauce here is that we create threaded executions of uploading our archives.
Methods included from Kitchen::Transport::Express::Archiver
Instance Method Details
#upload(locals, remote) ⇒ Object
Overrides the upload method in Kitchen::Transport::Ssh::Connection The special sauce here is that we create threaded executions of uploading our archives
rubocop: disable Metrics/MethodLength
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/kitchen/transport/express_ssh.rb', line 99 def upload(locals, remote) return super unless valid_remote_requirements?(remote) processed_locals = process_locals(locals) pool, exceptions = thread_pool(processed_locals) processed_locals.each do |local| pool.post do transfer(local, remote, session.) rescue => e exceptions << e.cause end end pool.shutdown pool.wait_for_termination raise ExpressFailed, exceptions.pop unless exceptions.empty? end |