Sha256: 23c69e3d1a116e96f608d8e3448dac7a1941597e095ed52e6d58a41db9be824d

Contents?: true

Size: 751 Bytes

Versions: 10

Compression:

Stored size: 751 Bytes

Contents

$:.unshift File.dirname(__FILE__)
require '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

10 entries across 10 versions & 1 rubygems

Version Path
chef-vpc-toolkit-2.8.2 test/ssh_util_test.rb
chef-vpc-toolkit-2.8.1 test/ssh_util_test.rb
chef-vpc-toolkit-2.8.0 test/ssh_util_test.rb
chef-vpc-toolkit-2.7.2 test/ssh_util_test.rb
chef-vpc-toolkit-2.7.1 test/ssh_util_test.rb
chef-vpc-toolkit-2.7.0 test/ssh_util_test.rb
chef-vpc-toolkit-2.6.1 test/ssh_util_test.rb
chef-vpc-toolkit-2.6.0 test/ssh_util_test.rb
chef-vpc-toolkit-2.5.2 test/ssh_util_test.rb
chef-vpc-toolkit-2.5.1 test/ssh_util_test.rb