Skip to content

Commit 80faed2

Browse files
authored
Merge pull request #122 from puzza007/remove-http-proxy-tests
Remove http proxy tests
2 parents 014e00c + 37b264d commit 80faed2

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

rebar.config

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
{meck, "0.8.10"},
1818
{cowboy, "2.9.0"},
1919
{ephemeral, "2.0.4"},
20-
{http_proxy, ".*", {git, "https://github.com/puzza007/http_proxy.git", {branch, "rebar3"}}},
2120
{proper, "1.3.0"}
2221
]}]
2322
}]

test/katipo_SUITE.erl

-36
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ init_per_group(https_mutual, Config) ->
5555
[{cert_file, list_to_binary(Cert)},
5656
{key_file, list_to_binary(Key)},
5757
{decrypted_key_der, KeyDer} | Config];
58-
init_per_group(proxy, Config) ->
59-
application:ensure_all_started(http_proxy),
60-
Config;
6158
init_per_group(_, Config) ->
6259
Config.
6360

@@ -68,24 +65,12 @@ end_per_group(http, Config) ->
6865
end_per_group(pool, Config) ->
6966
application:stop(meck),
7067
Config;
71-
end_per_group(proxy, Config) ->
72-
application:stop(http_proxy),
73-
Config;
7468
end_per_group(_, Config) ->
7569
Config.
7670

77-
init_per_testcase(TestCase, Config)
78-
when TestCase == proxy_get orelse TestCase == proxy_post_data ->
79-
{ok, HttpProxyService} = http_proxy:start(3128, []),
80-
[{http_proxy, HttpProxyService} | Config];
8171
init_per_testcase(_, Config) ->
8272
Config.
8373

84-
end_per_testcase(TestCase, Config)
85-
when TestCase == proxy_get orelse TestCase == proxy_post_data ->
86-
HttpProxyService = ?config(http_proxy, Config),
87-
ok = http_proxy:stop(HttpProxyService),
88-
proplists:delete(http_proxy, Config);
8974
end_per_testcase(_, Config) ->
9075
Config.
9176

@@ -160,9 +145,6 @@ groups() ->
160145
badssl]},
161146
{https_mutual, [],
162147
[badssl_client_cert]},
163-
{proxy, [],
164-
[proxy_get,
165-
proxy_post_data]},
166148
{session, [parallel],
167149
[session_new,
168150
session_new_bad_opts,
@@ -183,7 +165,6 @@ all() ->
183165
{group, pool},
184166
{group, https},
185167
{group, https_mutual},
186-
{group, proxy},
187168
{group, session},
188169
{group, port},
189170
{group, metrics},
@@ -749,23 +730,6 @@ badssl_client_cert(Config) ->
749730
end,
750731
ok.
751732

752-
proxy_get(_) ->
753-
Url = <<"http://httpbin.org/get?a=%21%40%23%24%25%5E%26%2A%28%29_%2B">>,
754-
{ok, #{status := 200, body := Body}} =
755-
katipo:get(?POOL, Url, #{proxy => <<"http://localhost:3128">>}),
756-
Json = jsx:decode(Body),
757-
[{<<"a">>, <<"!@#$%^&*()_+">>}] = proplists:get_value(<<"args">>, Json).
758-
759-
proxy_post_data(_) ->
760-
Url = <<"http://httpbin.org/post">>,
761-
{ok, #{status := 200, body := Body}} =
762-
katipo:post(?POOL, Url,
763-
#{headers => [{<<"Content-Type">>, <<"application/json">>}],
764-
body => <<"!@#$%^&*()">>,
765-
proxy => <<"http://localhost:3128">>}),
766-
Json = jsx:decode(Body),
767-
<<"!@#$%^&*()">> = proplists:get_value(<<"data">>, Json).
768-
769733
%% session
770734

771735
session_new(_) ->

0 commit comments

Comments
 (0)