test(s3): fix httpc ssl opts

This commit is contained in:
Zaiming (Stone) Shi 2023-12-14 13:13:10 +01:00
parent bfc02d1ccf
commit 8a425d09bc
2 changed files with 5 additions and 3 deletions

View File

@ -129,7 +129,7 @@ t_url(Config) ->
?assertMatch( ?assertMatch(
{ok, {{_StatusLine, 200, "OK"}, _Headers, "data"}}, {ok, {{_StatusLine, 200, "OK"}, _Headers, "data"}},
httpc:request(Url) httpc:request(get, {Url, []}, [{ssl, [{verify, verify_none}]}], [])
). ).
t_no_acl(Config) -> t_no_acl(Config) ->

View File

@ -205,7 +205,8 @@ t_signed_url_download(_Config) ->
emqx_s3_client:uri(Client, Key) emqx_s3_client:uri(Client, Key)
end), end),
{ok, {_, _, Body}} = httpc:request(get, {SignedUrl, []}, [], []), HttpOpts = [{ssl, [{verify, verify_none}]}],
{ok, {_, _, Body}} = httpc:request(get, {SignedUrl, []}, HttpOpts, []),
?assertEqual( ?assertEqual(
iolist_to_binary(Data), iolist_to_binary(Data),
@ -222,7 +223,8 @@ t_signed_nonascii_url_download(_Config) ->
emqx_s3_client:uri(Client, Key) emqx_s3_client:uri(Client, Key)
end), end),
{ok, {_, _, Body}} = httpc:request(get, {SignedUrl, []}, [], []), HttpOpts = [{ssl, [{verify, verify_none}]}],
{ok, {_, _, Body}} = httpc:request(get, {SignedUrl, []}, HttpOpts, []),
?assertEqual( ?assertEqual(
iolist_to_binary(Data), iolist_to_binary(Data),