Class: Specinfra::Backend::BeakerBase

Inherits:
Base
  • Object
show all
Defined in:
lib/beaker-rspec/helpers/serverspec.rb

Direct Known Subclasses

BeakerCygwin, BeakerDispatch, BeakerExec

Instance Method Summary collapse

Instance Method Details

#exampleObject

Example accessor



169
170
171
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 169

def example
  @example
end

#ssh_exec!(node, command) ⇒ Hash

Execute the provided ssh command

Parameters:

  • command (String)

    The command to be executed

Returns:

  • (Hash)

    Returns a hash containing :exit_status, :stdout and :stderr



176
177
178
179
180
181
182
183
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 176

def ssh_exec!(node, command)
  r = on node, command, { :acceptable_exit_codes => (0..127) }
  {
    :exit_status => r.exit_code,
    :stdout      => r.stdout,
    :stderr      => r.stderr
  }
end