Sha256: 7baa344f68fbeda34a113c9de1f4d3944e7f0f7de34c0072608da8cf86613040

Contents?: true

Size: 1.17 KB

Versions: 36

Compression:

Stored size: 1.17 KB

Contents

describe 'ssh_config executable' do

  # Setup a platform for ssh_config tests
  #
  # Parameters::
  # * Proc: Code called when the platform is setup
  #   * Parameters::
  #     * *repository* (String): Platform's repository
  def with_test_platform_for_ssh_config
    with_test_platform({ nodes: { 'node1' => {}, 'node2' => {} } }) do |repository|
      yield repository
    end
  end

  it 'dumps the SSH config without arguments' do
    with_test_platform_for_ssh_config do
      expect(test_actions_executor.connector(:ssh)).to receive(:ssh_config).with(ssh_exec: 'ssh') { '# SSH config' }
      exit_code, stdout, stderr = run 'ssh_config'
      expect(exit_code).to eq 0
      expect(stdout).to match /# SSH config/
      expect(stderr).to eq ''
    end
  end

  it 'dumps the SSH config with an alternate SSH executable' do
    with_test_platform_for_ssh_config do
      expect(test_actions_executor.connector(:ssh)).to receive(:ssh_config).with(ssh_exec: 'my_ssh') { '# SSH config' }
      exit_code, stdout, stderr = run 'ssh_config', '--ssh-exec', 'my_ssh'
      expect(exit_code).to eq 0
      expect(stdout).to match /# SSH config/
      expect(stderr).to eq ''
    end
  end

end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.0.0 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.18.0 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.17.1 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.17.0 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.16.4 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.16.3 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.16.2 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.16.1 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.16.0 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.15.0 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.14.0 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.13.4 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.13.3 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.13.2 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.13.1 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.13.0 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.12.0 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.11.2 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.11.1 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb
hybrid_platforms_conductor-32.11.0 spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb