Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/kitchen/transport/rsync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def upload(locals, remote)
time = Benchmark.realtime do
ret << system(rsync_cmd)
end
logger.info("[rsync] Time taken to upload #{rsync_candidates.join(';')} to #{self}:#{remote}: %.2f sec" % time)
logger.info("[rsync] Time taken to upload %s to %s:%s: %.2f sec" % [ rsync_candidates.join(';'), self, remote, time ])
unless ret.first
logger.warn("[rsync] rsync exited with status #{$?.exitstatus}, using SCP instead")
@rsync_failed = true
Expand Down Expand Up @@ -97,7 +97,11 @@ def ssh_args
args += %W{ -o IdentitiesOnly=yes } if @options[:keys]
args += %W{ -o LogLevel=#{@logger.debug? ? "VERBOSE" : "ERROR"} }
args += %W{ -o ForwardAgent=#{options[:forward_agent] ? "yes" : "no"} } if @options.key? :forward_agent
Array(@options[:keys]).each { |ssh_key| args += %W{ -i #{ssh_key}} }
# use '-o IdentityFile=/path/to/file' instead of '-i' flag.
# this fixes an error that shows up with:
# 'ssh_percent_expand: unknown key %2'
# when the path to key includes '%'.
Array(@options[:keys]).each { |ssh_key| args += %W{ -o IdentityFile=#{ssh_key.gsub('%', '%%')} } }
args += %W{ -p #{@session.options[:port]}}
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/kitchen/transport/sftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def upload(locals, remote)
time = Benchmark.realtime do
sftp_upload!(local, full_remote, options)
end
logger.info("[SFTP] Time taken to upload #{local} to #{self}:#{full_remote}: %.2f sec" % time)
logger.info("[SFTP] Time taken to upload %s to %s:%s: %.2f sec" % [ local, self, full_remote, time])
end
end

Expand Down