Sha256: 1cf482dc0e32572f71a0e8587f5e6ba13d7ed02edc28ab778c672dbd10bfd71a

Contents?: true

Size: 794 Bytes

Versions: 28

Compression:

Stored size: 794 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../../../test_helper"

include_fixture_resources
include_chef_only_resources

class RouteResourceTest < Test::Unit::TestCase
  context "Base" do
    setup do
      PoolParty::Resource.define_resource_methods
      @res = PoolParty::Resources::Route.new "20.0.0.0" do
        gateway "10.0.0.20"
        metric 5
        route_type :net
        netmask "255.255.0.0"
      end
      @res.does_not_exist!
      @base = DependencyResolvers::Chef
      @base.compile_directory = test_dir
    end
    
    should "have the route print to chef" do
      str =<<-EOE
route "20.0.0.0" do
  gateway "10.0.0.20"
  metric 5
  route_type :net
  netmask "255.255.0.0"
  action :delete
end
EOE

      assert_equal str.chomp, @base.compile(@res)
    end
    
  end
  
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.1 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.10 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.11 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.12 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.13 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.14 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.15 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.16 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.17 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.2 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.3 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.4 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.5 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.6 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.7 test/lib/dependency_resolvers/chef/resources/route_test.rb
auser-poolparty-1.3.8 test/lib/dependency_resolvers/chef/resources/route_test.rb
fairchild-poolparty-1.3.17 test/lib/dependency_resolvers/chef/resources/route_test.rb
fairchild-poolparty-1.3.5 test/lib/dependency_resolvers/chef/resources/route_test.rb
poolparty-1.3.15 test/lib/dependency_resolvers/chef/resources/route_test.rb