Class: Kitchen::Transport::Dockercp

Inherits:
Ssh
  • Object
show all
Defined in:
lib/kitchen/transport/dockercp.rb

Defined Under Namespace

Classes: Connection

Instance Method Summary collapse

Instance Method Details

#create_new_connection(options, &block) ⇒ Object

Copy-pasta from Ssh#create_new_connection because I need the SFTP connection class. Tracked in github.com/test-kitchen/test-kitchen/pull/726



14
15
16
17
18
19
20
21
22
# File 'lib/kitchen/transport/dockercp.rb', line 14

def create_new_connection(options, &block)
  if @connection
    logger.debug("[SSH] shutting previous connection #{@connection}")
    @connection.close
  end

  @connection_options = options
  @connection = self.class::Connection.new(options.merge(instance: instance), &block)
end