summaryrefslogtreecommitdiff
path: root/spec/unit/provider/package
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-07-14 18:00:38 -0700
committerPete Higgins <pete@peterhiggins.org>2020-07-14 18:08:20 -0700
commitf58ac55f77b4baa9328bddb2515bebf233d5c579 (patch)
treefdbe75bf26c92b440bfd47cbc54d2b9775f09b12 /spec/unit/provider/package
parent8a7c8b513f13026def7f6115343aad94bfcf9eac (diff)
downloadchef-f58ac55f77b4baa9328bddb2515bebf233d5c579.tar.gz
Workaround SSL cert verification failure in test.fix-rubygems-ssl-test-failure
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'spec/unit/provider/package')
-rw-r--r--spec/unit/provider/package/rubygems_spec.rb4
1 files changed, 4 insertions, 0 deletions
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)