Skip to content

Commit cb98271

Browse files
Merge pull request #8763 from gimmyxd/PUP-11217
(PUP-11217) do not eager load Puppet's HttpClient
2 parents 817f347 + 81cca31 commit cb98271

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

lib/puppet/test/test_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def self.before_each_test()
142142
},
143143
"Context for specs")
144144

145-
Puppet.runtime.load_services
145+
# trigger `require 'facter'`
146+
Puppet.runtime[:facter]
146147

147148
Puppet::Parser::Functions.reset
148149
Puppet::Application.clear!

spec/unit/network/http/connection_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,6 @@ def retry_after(datetime)
561561
end
562562

563563
it "should sleep for no more than the Puppet runinterval" do
564-
Puppet.runtime.clear
565564
retry_after('60')
566565

567566
Puppet[:runinterval] = 30

spec/unit/network/http_pool_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def initialize(host, port, options = {})
3737
end
3838

3939
it "switches to the external client implementation" do
40-
Puppet.runtime.clear
4140
Puppet::Network::HttpPool.http_client_class = http_impl
4241

4342
expect(Puppet.runtime[:http]).to be_an_instance_of(Puppet::HTTP::ExternalClient)

0 commit comments

Comments
 (0)