Sha256: 188bda8a559052977b2959b39c6ac367a1340899cedf38e9e3f7e2ee367ed8ee

Contents?: true

Size: 820 Bytes

Versions: 2

Compression:

Stored size: 820 Bytes

Contents

$:.unshift File.dirname(__FILE__)
require 'test_helper'

require 'tempfile'

module ChefVPCToolkit

class VpnNetworkManagerTest < Test::Unit::TestCase

  include ChefVPCToolkit::CloudServersVPC

  def setup
    tmpdir=TmpDir.new_tmp_dir
    File.open(File.join(tmpdir, "gconftool-2"), 'w') do |f|
      f.write("#!/bin/bash\nexit 0")
      f.chmod(0755)
    end
    ENV['PATH']=tmpdir+":"+ENV['PATH']
  end

  def teardown
    group=ServerGroup.from_xml(SERVER_GROUP_XML)
    VpnNetworkManager.delete_certs(group.id)
  end

  def test_configure_gconf
    group=ServerGroup.from_xml(SERVER_GROUP_XML)
    client=Client.from_xml(CLIENT_XML)
    assert VpnNetworkManager.configure_gconf(group, client)
  end

  def test_ip_to_integer
    assert_equal 16782252, VpnNetworkManager.ip_to_integer("172.19.0.1")
  end

end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chef-vpc-toolkit-2.5.2 test/vpn_network_manager_test.rb
chef-vpc-toolkit-2.5.1 test/vpn_network_manager_test.rb