Sha256: 998d83f0e5aa376fba64abd7ef4bf634771f97666188584bc8aabc1b0d78384e

Contents?: true

Size: 1.22 KB

Versions: 31

Compression:

Stored size: 1.22 KB

Contents

describe HybridPlatformsConductor::ActionsExecutor do

  context 'when checking connector plugin ssh' do

    context 'when checking additional helpers on prepared nodes' do

      it 'provides an SSH executable wrapping the node\'s SSH config' do
        with_test_platform_for_remote_testing do
          expect(`#{test_connector.ssh_exec} -V 2>&1`).to eq `ssh -V 2>&1`
          expect(`#{test_connector.ssh_exec} -G hpc.node`.split("\n").find { |line| line =~ /^hostname .+$/ }).to eq 'hostname 192.168.42.42'
        end
      end

      it 'provides an SSH URL that can be used by other processes to connect to this node' do
        with_test_platform_for_remote_testing do
          expect(test_connector.ssh_url).to eq 'hpc.node'
        end
      end

      it 'uses sshpass in the provided SSH executable if needed' do
        with_test_platform_for_remote_testing(password: 'PaSsWoRd') do
          expect(`#{test_connector.ssh_exec} -V 2>&1`).to eq `ssh -V 2>&1`
          expect(`#{test_connector.ssh_exec} -G hpc.node`.split("\n").find { |line| line =~ /^hostname .+$/ }).to eq 'hostname 192.168.42.42'
          expect(File.read(test_connector.ssh_exec)).to match(/^sshpass -pPaSsWoRd ssh .+$/)
        end
      end

    end

  end

end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.9.5 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.9.4 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.9.2 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.9.1 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.9.0 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.8.4 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.8.3 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.8.2 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.8.1 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.8.0 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.7.4 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.7.3 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.7.2 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.7.1 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.7.0 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.6.0 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.5.1 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.5.0 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.4.0 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb
hybrid_platforms_conductor-33.3.0 spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb