Skip to content

Commit 826dcff

Browse files
authored
Merge pull request #2 from jeremyevans/invalid-servername
Switch invalid server name format
2 parents 54f353c + 0e8dc91 commit 826dcff

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/net/http/test_https.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_get_SNI_proxy
108108

109109
def test_get_SNI_failure
110110
TestNetHTTPUtils.clean_http_proxy_env do
111-
http = Net::HTTP.new("invalid_servername", config("port"))
111+
http = Net::HTTP.new("invalidservername", config("port"))
112112
http.ipaddr = config('host')
113113
http.use_ssl = true
114114
http.cert_store = TEST_STORE
@@ -212,22 +212,22 @@ def test_verify_none
212212
skip $!
213213
end
214214

215-
def test_skip_hostname_verfiction
215+
def test_skip_hostname_verification
216216
TestNetHTTPUtils.clean_http_proxy_env do
217-
http = Net::HTTP.new('invalid_servername', config('port'))
217+
http = Net::HTTP.new('invalidservername', config('port'))
218218
http.ipaddr = config('host')
219219
http.use_ssl = true
220220
http.cert_store = TEST_STORE
221221
http.verify_hostname = false
222222
assert_nothing_raised { http.start }
223223
ensure
224-
http&.finish
224+
http.finish if http&.started?
225225
end
226226
end
227227

228228
def test_fail_if_verify_hostname_is_true
229229
TestNetHTTPUtils.clean_http_proxy_env do
230-
http = Net::HTTP.new('invalid_servername', config('port'))
230+
http = Net::HTTP.new('invalidservername', config('port'))
231231
http.ipaddr = config('host')
232232
http.use_ssl = true
233233
http.cert_store = TEST_STORE

0 commit comments

Comments
 (0)