Class: Kitchen::Transport::ExpressSsh
- Inherits:
-
Ssh
- Object
- Ssh
- Kitchen::Transport::ExpressSsh
- Defined in:
- lib/kitchen/transport/express_ssh.rb
Overview
Express SSH Transport plugin for Test Kitchen
Defined Under Namespace
Classes: Connection
Instance Method Summary collapse
-
#create_new_connection(options, &block) ⇒ Ssh::Connection
Override the method in the super class to start the connection with our connection class.
-
#finalize_config!(instance) ⇒ Object
Finalizes the Kitchen config by executing super and parsing the options provided by the kitchen.yml The only difference here is we layer in our ssh options so the verifier can use our transport (see Kitchen::Transport::Ssh#finalize_config!).
-
#verifier_defined?(instance) ⇒ Boolean
Determines if the Kitchen instance is attempting a Verify stage.
Instance Method Details
#create_new_connection(options, &block) ⇒ Ssh::Connection
Override the method in the super class to start the connection with our connection class
52 53 54 55 56 57 58 59 60 |
# File 'lib/kitchen/transport/express_ssh.rb', line 52 def create_new_connection(, &block) if @connection logger.debug("[#{Express::LOG_PREFIX}] Shutting previous connection #{@connection}") @connection.close end @connection_options = @connection = self.class::Connection.new(, &block) end |
#finalize_config!(instance) ⇒ Object
Finalizes the Kitchen config by executing super and parsing the options provided by the kitchen.yml The only difference here is we layer in our ssh options so the verifier can use our transport (see Kitchen::Transport::Ssh#finalize_config!)
73 74 75 76 77 78 79 80 81 |
# File 'lib/kitchen/transport/express_ssh.rb', line 73 def finalize_config!(instance) super.tap do if verifier_defined?(instance) instance.verifier.send(:define_singleton_method, :runner_options_for_expressssh) do |config_data| (config_data) end end end end |