Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip SSL tests instead silently passing them. #1500

Merged
merged 2 commits into from Mar 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 4 additions & 10 deletions test/test_puma_server_ssl.rb
Expand Up @@ -21,9 +21,10 @@ def ssl_error(server, peeraddr, peercert, error)
class TestPumaServerSSL < Minitest::Test

def setup
return if DISABLE_SSL
port = 3212
host = "127.0.0.1"
skip("SSL isn't used.") if DISABLE_SSL
@port = 3212
@host = "127.0.0.1"


app = lambda { |env| [200, {}, [env['rack.url_scheme']]] }

Expand Down Expand Up @@ -62,8 +63,6 @@ def teardown
end

def test_url_scheme_for_https
return if DISABLE_SSL

body = nil
@http.start do
req = Net::HTTP::Get.new "/", {}
Expand All @@ -77,8 +76,6 @@ def test_url_scheme_for_https
end

def test_very_large_return
return if DISABLE_SSL

giant = "x" * 2056610

@server.app = proc do
Expand All @@ -97,8 +94,6 @@ def test_very_large_return
end

def test_form_submit
return if DISABLE_SSL

body = nil
@http.start do
req = Net::HTTP::Post.new '/'
Expand All @@ -114,7 +109,6 @@ def test_form_submit
end

def test_ssl_v3_rejection
return if DISABLE_SSL
@http.ssl_version='SSLv3'
assert_raises(OpenSSL::SSL::SSLError) do
@http.start do
Expand Down