mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
drying up the requires in the openssl tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1c93261983
commit
033cea7d8e
17 changed files with 20 additions and 94 deletions
|
@ -1,5 +1,4 @@
|
|||
require_relative 'utils'
|
||||
require "digest/md5"
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
require 'openssl'
|
||||
require "test/unit"
|
||||
require 'tempfile'
|
||||
require File.join(File.dirname(__FILE__), "utils.rb")
|
||||
require_relative 'utils'
|
||||
|
||||
class OpenSSL::TestConfig < Test::Unit::TestCase
|
||||
def setup
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
rescue LoadError
|
||||
end
|
||||
require "digest/md5"
|
||||
require "test/unit"
|
||||
require_relative 'utils'
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require File.join(File.dirname(__FILE__), "utils.rb")
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative 'utils'
|
||||
|
||||
if defined?(OpenSSL::PKey::EC)
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative 'utils'
|
||||
|
||||
class OpenSSL::TestHMAC < Test::Unit::TestCase
|
||||
def setup
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require_relative 'utils'
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative 'utils'
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
||||
class OpenSSL::TestNSSPI < Test::Unit::TestCase
|
||||
def setup
|
||||
# This request data is adopt from the specification of
|
||||
|
@ -20,9 +14,6 @@ class OpenSSL::TestNSSPI < Test::Unit::TestCase
|
|||
@b64 << "i0//rgBvmco="
|
||||
end
|
||||
|
||||
def teardown
|
||||
end
|
||||
|
||||
def test_build_data
|
||||
key1 = OpenSSL::TestUtils::TEST_KEY_RSA1024
|
||||
key2 = OpenSSL::TestUtils::TEST_KEY_RSA2048
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require_relative "utils"
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative "utils"
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require_relative 'utils'
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative 'utils'
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require File.join(File.dirname(__FILE__), "utils.rb")
|
||||
rescue LoadError
|
||||
end
|
||||
require 'test/unit'
|
||||
require_relative 'utils'
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require_relative "utils.rb"
|
||||
rescue LoadError
|
||||
end
|
||||
require "rbconfig"
|
||||
require "socket"
|
||||
require "test/unit"
|
||||
require_relative '../ruby/envutil'
|
||||
require_relative "utils"
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require_relative "utils"
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative "utils"
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require_relative "utils"
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative "utils"
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require File.join(File.dirname(__FILE__), "utils.rb")
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative 'utils'
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative 'utils'
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require_relative "utils"
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative "utils"
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "openssl"
|
||||
require_relative "utils"
|
||||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require_relative "utils"
|
||||
|
||||
if defined?(OpenSSL)
|
||||
|
||||
|
|
|
@ -3,6 +3,11 @@ begin
|
|||
rescue LoadError
|
||||
end
|
||||
require "test/unit"
|
||||
require "digest/md5"
|
||||
require 'tempfile'
|
||||
require "rbconfig"
|
||||
require "socket"
|
||||
require_relative '../ruby/envutil'
|
||||
|
||||
module OpenSSL::TestUtils
|
||||
TEST_KEY_RSA1024 = OpenSSL::PKey::RSA.new <<-_end_of_pem_
|
||||
|
|
Loading…
Reference in a new issue