1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Skip more rubygems tests when openssl is missing

Some tests are already skipped, but some tests are not.
So latter should be skipped too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2018-07-04 12:45:46 +00:00
parent bd9a78a0fe
commit e4664efaf8
4 changed files with 14 additions and 3 deletions

View file

@ -154,6 +154,8 @@ class TestGemCommandsBuildCommand < Gem::TestCase
SIGNING_KEY = key_path 'private3072'
def test_build_signed_gem
skip 'openssl is missing' unless defined?(OpenSSL::SSL)
trust_dir = Gem::Security.trust_dir
spec = util_spec 'some_gem' do |s|

View file

@ -119,6 +119,8 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
end
def test_security_policy_unknown
skip 'openssl is missing' unless defined?(OpenSSL::SSL)
@cmd.add_install_update_options
e = assert_raises OptionParser::InvalidArgument do

View file

@ -9,6 +9,10 @@ rescue LoadError => e
e.message =~ / -- openssl$/
end
unless defined?(OpenSSL::SSL) then
warn 'Skipping Gem::Request tests. openssl not found.'
end
require 'rubygems/remote_fetcher'
require 'rubygems/package'
require 'minitest/mock'
@ -1067,4 +1071,4 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
assert_equal "/home/skillet", @fetcher.correct_for_windows_path(path)
end
end
end if defined?(OpenSSL::SSL)

View file

@ -4,6 +4,10 @@ require 'rubygems/request'
require 'ostruct'
require 'base64'
unless defined?(OpenSSL::SSL) then
warn 'Skipping Gem::Request tests. openssl not found.'
end
class TestGemRequest < Gem::TestCase
CA_CERT_FILE = cert_path 'ca'
@ -491,5 +495,4 @@ ERROR: Certificate is an invalid CA certificate
end
end
end
end if defined?(OpenSSL::SSL)