Sha256: eac804656cf5cda563b1e73028c332d4859a76198bbb612586a20c2277ff8d75

Contents?: true

Size: 743 Bytes

Versions: 7

Compression:

Stored size: 743 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

require 'tempfile'

module ChefVPCToolkit

class SshUtilTest < Test::Unit::TestCase

  def test_remove_known_hosts_ip

    t=Tempfile.new('ssh_test')
    t.write(%{login,172.19.0.1 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAu1Xfhjj0hZwDIXWa6Gd/Qk/S9VwO5ec9+u6CMLMteQY4seeXmpu643k8zCa6yLuDXyzucknfrsxtOKJVQ6F5glXW6+Ko/zPiPNQbeC6GIKDs2a3m6A5OJSqRHqoy0RTJu11Acs3tkWUgmvBKFX7jxEZuHJM1kI0/xP0JlO0zOVr8+9Wg6Zy5KfVnEsgbdaEvpk3Rrtt5Lm42w/uxvPTFY7AWBhUfloYqBQrX6zd8d17jHLCnukHmvdR7eVGihXREtvDjX4ycG1o5/9amLWR0ELVFkFiXPHyWCuyl21j5uI7Ro9P2pga5ypnDB+N1BjFJHSMMofT40XOBkzAxBUrLgw==\n})
    t.flush
    SshUtil.remove_known_hosts_ip('login,172.19.0.1', t.path)
    assert_equal "", IO.read(t.path)

  end

end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chef-vpc-toolkit-2.5.0 test/ssh_util_test.rb
chef-vpc-toolkit-2.4.0 test/ssh_util_test.rb
chef-vpc-toolkit-2.3.2 test/ssh_util_test.rb
chef-vpc-toolkit-2.3.1 test/ssh_util_test.rb
chef-vpc-toolkit-2.3.0 test/ssh_util_test.rb
chef-vpc-toolkit-2.2.0 test/ssh_util_test.rb
chef-vpc-toolkit-2.1.0 test/ssh_util_test.rb