Class: Kitchen::Transport::SshTgz::Connection

Inherits:
Kitchen::Transport::Ssh::Connection
  • Object
show all
Defined in:
lib/kitchen/transport/ssh_tgz.rb

Overview

Manage a connection for the SshTgz transport mechanism. This is essentially the same as for the Ssh::Connection class, except we compress before uploading.

Instance Method Summary collapse

Instance Method Details

#upload(locals, remote) ⇒ Object



48
49
50
51
52
53
54
55
56
# File 'lib/kitchen/transport/ssh_tgz.rb', line 48

def upload(locals, remote)
  # attempt tar-gzip upload, to improve performance.
  return if Array(locals).empty? || upload_via_tgz(Array(locals), remote)

  # if tgz upload fails (e.g. not supported on target platform), fall back to
  # file-by-file upload.
  logger.warn("Tgz upload failed. Resorting to file-by-file upload.")
  super
end