Sha256: 79cb21dd7c82b52c4951e349ba8106477a55e98d92d1f1e1a4ca1eb24b47753f

Contents?: true

Size: 699 Bytes

Versions: 10

Compression:

Stored size: 699 Bytes

Contents

require 'spec_helper'

describe Chake::Backend::Ssh do

  include_examples "Chake::Backend", Chake::Backend::Ssh

  let(:node) { Chake::Node.new('ssh://myuser@myhost/srv/chef') }

  it('runs commands with ssh') { expect(backend.command_runner).to eq(['ssh', 'myuser@myhost']) }

  it('rsyncs over ssh') { expect(backend.rsync_dest).to eq('myuser@myhost:/srv/chef/') }

  it 'uses no remote username if none was passed' do
    node = Chake::Node.new('theserver')
    expect(node.username).to eq(Etc.getpwuid.name)
    expect(node.remote_username).to be_nil
  end

  it 'uses username is passwd' do
    expect(node.username).to eq('myuser')
    expect(node.remote_username).to eq('myuser')
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
chake-0.10 spec/chake/backend/ssh_spec.rb
chake-0.9.1 spec/chake/backend/ssh_spec.rb
chake-0.9 spec/chake/backend/ssh_spec.rb
chake-0.8 spec/chake/backend/ssh_spec.rb
chake-0.7 spec/chake/backend/ssh_spec.rb
chake-0.6 spec/chake/backend/ssh_spec.rb
chake-0.5 spec/chake/backend/ssh_spec.rb
chake-0.4.3 spec/chake/backend/ssh_spec.rb
chake-0.4.2 spec/chake/backend/ssh_spec.rb
chake-0.4.1 spec/chake/backend/ssh_spec.rb