mirror of
https://github.com/valitydev/woody_erlang.git
synced 2024-11-06 02:15:19 +00:00
MSPF-458: Fix ssl SUITE tests (#106)
* MSPF-458: Fix ssl SUITE tests * MSPF-458: Remove extra newline
This commit is contained in:
parent
a4921bde49
commit
f0df3414cf
@ -90,11 +90,13 @@ end_per_suite(C) ->
|
||||
|
||||
client_wo_cert_test(C) ->
|
||||
SSLOptions = [{cacertfile, ?ca_cert(C)}],
|
||||
?assertException(
|
||||
error,
|
||||
{woody_error, {internal, result_unexpected, <<"{tls_alert,\"handshake failure\"}">>}},
|
||||
get_weapon(?FUNCTION_NAME, <<"BFG">>, SSLOptions)
|
||||
).
|
||||
try
|
||||
get_weapon(?FUNCTION_NAME, <<"BFG">>, SSLOptions),
|
||||
error(unreachable)
|
||||
catch
|
||||
error:{woody_error, {internal, result_unexpected, Reason}} ->
|
||||
{match, _} = re:run(Reason, <<"^{tls_alert,[\"\{]handshake[ _]failure.*$">>, [])
|
||||
end.
|
||||
|
||||
-spec valid_client_cert_test(config()) -> _.
|
||||
|
||||
@ -106,11 +108,13 @@ valid_client_cert_test(C) ->
|
||||
|
||||
invalid_client_cert_test(C) ->
|
||||
SSLOptions = [{cacertfile, ?ca_cert(C)}, {certfile, ?invalid_client_cert(C)}],
|
||||
?assertException(
|
||||
error,
|
||||
{woody_error, {internal, result_unexpected, <<"{tls_alert,\"unknown ca\"}">>}},
|
||||
get_weapon(?FUNCTION_NAME, <<"BFG">>, SSLOptions)
|
||||
).
|
||||
try
|
||||
get_weapon(?FUNCTION_NAME, <<"BFG">>, SSLOptions),
|
||||
error(unreachable)
|
||||
catch
|
||||
error:{woody_error, {internal, result_unexpected, Reason}} ->
|
||||
{match, _} = re:run(Reason, <<"^{tls_alert,[\"\{]unknown[ _]ca.*$">>, [])
|
||||
end.
|
||||
|
||||
%%%
|
||||
%%% woody_event_handler callback
|
||||
|
Loading…
Reference in New Issue
Block a user