1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

test/test_puma_server_ssl.rb - add Ruby OpenSSL version info (#1942)

Recent CI experimentation has shown system OpenSSL to be different than Ruby OpenSSL.  May cause testing issues.

Adds Ruby OpenSSL version info to test log by test_puma_server_ssl.rb when Minitest loads test files.
This commit is contained in:
MSP-Greg 2019-09-02 02:16:15 -05:00 committed by Nate Berkopec
parent 6a574771e6
commit 08f8d1945d

View file

@ -19,14 +19,15 @@ end
DISABLE_SSL = begin
Puma::Server.class
Puma::MiniSSL.check
puts "", RUBY_DESCRIPTION
puts "Puma::MiniSSL OPENSSL_LIBRARY_VERSION: #{Puma::MiniSSL::OPENSSL_LIBRARY_VERSION}",
" OPENSSL_VERSION: #{Puma::MiniSSL::OPENSSL_VERSION}", ""
# net/http (loaded in helper) does not necessarily load OpenSSL
require "openssl" unless Object.const_defined? :OpenSSL
puts "", RUBY_DESCRIPTION,
" Puma::MiniSSL OpenSSL",
"OPENSSL_LIBRARY_VERSION: #{Puma::MiniSSL::OPENSSL_LIBRARY_VERSION.ljust 32}#{OpenSSL::OPENSSL_LIBRARY_VERSION}",
" OPENSSL_VERSION: #{Puma::MiniSSL::OPENSSL_VERSION.ljust 32}#{OpenSSL::OPENSSL_VERSION}", ""
rescue
true
else
# net/http (loaded in helper) does not necessarily load OpenSSL
require "openssl" unless Object.const_defined? :OpenSSL
false
end