From 08f8d1945db416da282f0ad5274bca3819ce40ed Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Mon, 2 Sep 2019 02:16:15 -0500 Subject: [PATCH] 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. --- test/test_puma_server_ssl.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/test_puma_server_ssl.rb b/test/test_puma_server_ssl.rb index 0b139fe4..9e2a3c02 100644 --- a/test/test_puma_server_ssl.rb +++ b/test/test_puma_server_ssl.rb @@ -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