diff options
author | Artem Pervin <artem.pervin@kaspersky.com> | 2016-11-30 13:45:06 -0500 |
---|---|---|
committer | Artem Pervin <artem.pervin@kaspersky.com> | 2016-11-30 13:45:06 -0500 |
commit | ffc2cf98d390a35cf3f61c7c0bf5f26e3552fd2c (patch) | |
tree | 2b50b486868f90f8f206623cdf64da109d2768c5 /test | |
parent | 72dcbe1c1b5204e2e92b80a25cac6acf54254ec2 (diff) |
1394: added fix for rebar_utils, moved setting of http_options into init_config, added unit tests
Diffstat (limited to 'test')
-rw-r--r-- | test/rebar_utils_SUITE.erl | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test/rebar_utils_SUITE.erl b/test/rebar_utils_SUITE.erl index b32992d..0d496a3 100644 --- a/test/rebar_utils_SUITE.erl +++ b/test/rebar_utils_SUITE.erl @@ -31,7 +31,8 @@ nonblacklisted_otp_version/1, blacklisted_otp_version/1, sh_does_not_miss_messages/1, - tup_merge/1]). + tup_merge/1, + proxy_auth/1]). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). @@ -46,7 +47,8 @@ end_per_testcase(_, _Config) -> all() -> [{group, args_to_tasks}, sh_does_not_miss_messages, - tup_merge]. + tup_merge, + proxy_auth]. groups() -> [{args_to_tasks, [], [empty_arglist, @@ -272,3 +274,15 @@ tup_merge(_Config) -> rebar_utils:tup_sort([{a,a},{a,a,a},a,{b,a,a},b,{z,a},{z,a,a},{b,a},z]) ) ). + +proxy_auth(_Config) -> + %% proxy auth with regular username/password + rebar_utils:set_proxy_auth("Username", "Password"), + ?assertEqual([{proxy_auth, {"Username", "Password"}}], + rebar_utils:get_proxy_auth()), + %% proxy auth with username missing and url encoded password + rebar_utils:set_proxy_auth("", "?!abc#$"), + ?assertEqual([{proxy_auth, {"", "%3F!abc%23%24"}}], + rebar_utils:get_proxy_auth()). + + |