From f58ac55f77b4baa9328bddb2515bebf233d5c579 Mon Sep 17 00:00:00 2001 From: Pete Higgins Date: Tue, 14 Jul 2020 18:00:38 -0700 Subject: Workaround SSL cert verification failure in test. Signed-off-by: Pete Higgins --- spec/unit/provider/package/rubygems_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/unit/provider/package') diff --git a/spec/unit/provider/package/rubygems_spec.rb b/spec/unit/provider/package/rubygems_spec.rb index 50bfbcb984..82b2cafee5 100644 --- a/spec/unit/provider/package/rubygems_spec.rb +++ b/spec/unit/provider/package/rubygems_spec.rb @@ -104,6 +104,10 @@ describe Chef::Provider::Package::Rubygems::CurrentGemEnvironment do end context "new default rubygems behavior" do + # Workaround an SSL failure that came up connecting to "http://production.cf.rubygems.org" + # Gem::RemoteFetcher::FetchError: + # SSL_connect returned=1 errno=0 state=error: certificate verify failed (certificate rejected) (https://production.cf.rubygems.org/api/v1/dependencies?gems=rspec) + # around do |example| original_value = Gem.configuration.ssl_verify_mode Gem.configuration.instance_variable_set("@ssl_verify_mode", OpenSSL::SSL::VERIFY_NONE) -- cgit v1.2.1