diff options
author | Artem Pervin <artem.pervin@kaspersky.com> | 2016-12-01 10:27:07 -0500 |
---|---|---|
committer | Artem Pervin <artem.pervin@kaspersky.com> | 2016-12-01 10:27:07 -0500 |
commit | c0184eae706f6c2bf7bcf8fc1db03c0569cb73c1 (patch) | |
tree | ef92703b3f8b2bbb1d45200f1f2e479f6cbf7e0c | |
parent | e60562fb307a8ff59f56746427e60ed3b2a1227a (diff) |
1394: refined export list and tests
-rw-r--r-- | src/rebar_utils.erl | 4 | ||||
-rw-r--r-- | test/rebar_utils_SUITE.erl | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 4b43911..a0a44d1 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -71,8 +71,8 @@ list_dir/1, user_agent/0, reread_config/1, - get_proxy_auth/0, - set_proxy_auth/1]). + get_proxy_auth/0]). + %% for internal use only -export([otp_release/0]). diff --git a/test/rebar_utils_SUITE.erl b/test/rebar_utils_SUITE.erl index e8f33a3..6307b42 100644 --- a/test/rebar_utils_SUITE.erl +++ b/test/rebar_utils_SUITE.erl @@ -276,15 +276,20 @@ tup_merge(_Config) -> ). proxy_auth(_Config) -> + Host = "host:", + Port = "1234", + application:unset_env(rebar, proxy_auth), %% proxy auth not set ?assertEqual([], rebar_utils:get_proxy_auth()), %% proxy auth with regular username/password - rebar_utils:set_proxy_auth("Username:Password"), + os:putenv("http_proxy", "http://Username:Password@" ++ Host ++ Port), + rebar_utils:set_httpc_options(), ?assertEqual([{proxy_auth, {"Username", "Password"}}], rebar_utils:get_proxy_auth()), %% proxy auth with username missing and url encoded password - rebar_utils:set_proxy_auth(":%3F!abc%23%24"), + os:putenv("http_proxy", "http://:%3F!abc%23%24@" ++ Host ++ Port), + rebar_utils:set_httpc_options(), ?assertEqual([{proxy_auth, {"", "?!abc#$"}}], rebar_utils:get_proxy_auth()). |