Sha256: 3bace8fbe068163dd226bc91d365def8d0229372a5d169f5ae83c51dab2ddba7

Contents?: true

Size: 1 KB

Versions: 21

Compression:

Stored size: 1 KB

Contents

#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet/network/http_pool'

describe Puppet::Network::HttpPool do

  describe "when managing http instances" do

    it "should return an http instance created with the passed host and port" do
      http = Puppet::Network::HttpPool.http_instance("me", 54321)
      http.should be_an_instance_of Puppet::Network::HTTP::Connection
      http.address.should == 'me'
      http.port.should    == 54321
    end

    it "should enable ssl on the http instance by default" do
      Puppet::Network::HttpPool.http_instance("me", 54321).should be_use_ssl
    end

    it "can set ssl using an option" do
      Puppet::Network::HttpPool.http_instance("me", 54321, false).should_not be_use_ssl
      Puppet::Network::HttpPool.http_instance("me", 54321, true).should be_use_ssl
    end

    it "should not cache http instances" do
      Puppet::Network::HttpPool.http_instance("me", 54321).
        should_not equal Puppet::Network::HttpPool.http_instance("me", 54321)
    end
  end

end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
puppet-3.2.4 spec/unit/network/http_pool_spec.rb
puppet-3.2.3 spec/unit/network/http_pool_spec.rb
puppet-3.2.3.rc1 spec/unit/network/http_pool_spec.rb
puppet-3.2.2 spec/unit/network/http_pool_spec.rb
puppet-3.2.1 spec/unit/network/http_pool_spec.rb
puppet-3.2.1.rc1 spec/unit/network/http_pool_spec.rb
puppet-3.2.0.rc2 spec/unit/network/http_pool_spec.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/puppet-3.1.0/spec/unit/network/http_pool_spec.rb
puppet-3.2.0.rc1 spec/unit/network/http_pool_spec.rb
puppet-3.1.1 spec/unit/network/http_pool_spec.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/puppet-3.1.0/spec/unit/network/http_pool_spec.rb
puppet-3.1.0 spec/unit/network/http_pool_spec.rb
puppet-3.1.0.rc2 spec/unit/network/http_pool_spec.rb
puppet-3.1.0.rc1 spec/unit/network/http_pool_spec.rb
puppet-3.0.2 spec/unit/network/http_pool_spec.rb
puppet-3.0.2.rc3 spec/unit/network/http_pool_spec.rb
puppet-3.0.2.rc2 spec/unit/network/http_pool_spec.rb
puppet-3.0.2.rc1 spec/unit/network/http_pool_spec.rb
puppet-3.0.1 spec/unit/network/http_pool_spec.rb
puppet-3.0.1.rc1 spec/unit/network/http_pool_spec.rb