summaryrefslogtreecommitdiff
path: root/test/rebar_pkg_SUITE.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-06-29 19:57:30 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-06-29 19:57:30 -0500
commitc88a6d3f231c312ff317719bcdbcd55e188ce333 (patch)
tree06829e7ba6cf844829576d8aef7f8678f1586b92 /test/rebar_pkg_SUITE.erl
parent67d3f26df51375d59bf8fee6e4f47f655c6e23fa (diff)
parent1c66f0eb9ff8504bd92960cb7573da853d79b5ab (diff)
Merge pull request #565 from tsloughter/hex_http_profile
setup hex httpc profile and http opts. needed also for proxy
Diffstat (limited to 'test/rebar_pkg_SUITE.erl')
-rw-r--r--test/rebar_pkg_SUITE.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/rebar_pkg_SUITE.erl b/test/rebar_pkg_SUITE.erl
index 95eb6f6..85bd6f0 100644
--- a/test/rebar_pkg_SUITE.erl
+++ b/test/rebar_pkg_SUITE.erl
@@ -61,7 +61,7 @@ init_per_testcase(good_disconnect=Name, Config0) ->
copy_to_cache(Pkg, Config),
meck:unload(httpc),
meck:new(httpc, [passthrough, unsticky]),
- meck:expect(httpc, request, fun(_, _, _, _) -> {error, econnrefused} end),
+ meck:expect(httpc, request, fun(_, _, _, _, _) -> {error, econnrefused} end),
Config;
init_per_testcase(bad_disconnect=Name, Config0) ->
Pkg = {<<"goodpkg">>, <<"1.0.0">>},
@@ -71,7 +71,7 @@ init_per_testcase(bad_disconnect=Name, Config0) ->
Config = mock_config(Name, Config1),
meck:unload(httpc),
meck:new(httpc, [passthrough, unsticky]),
- meck:expect(httpc, request, fun(_, _, _, _) -> {error, econnrefused} end),
+ meck:expect(httpc, request, fun(_, _, _, _, _) -> {error, econnrefused} end),
Config.
end_per_testcase(_, Config) ->
@@ -186,9 +186,9 @@ mock_config(Name, Config) ->
{ok, PkgContents} = file:read_file(filename:join(?config(data_dir, Config), PkgFile)),
meck:new(httpc, [passthrough, unsticky]),
meck:expect(httpc, request,
- fun(get, {_Url, _Opts}, _, _) when GoodCache ->
+ fun(get, {_Url, _Opts}, _, _, _) when GoodCache ->
{ok, {{Vsn, 304, <<"Not Modified">>}, [{"etag", ?good_etag}], <<>>}};
- (get, {_Url, _Opts}, _, _) ->
+ (get, {_Url, _Opts}, _, _, _) ->
{ok, {{Vsn, 200, <<"OK">>}, [{"etag", ?good_etag}], PkgContents}}
end),
[{cache_root, CacheRoot},