diff options
author | Tristan Sloughter <[email protected]> | 2014-11-03 20:47:54 -0600 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2014-11-06 10:03:08 -0600 |
commit | 79bbf33cbd46c9a1beeae00424e14969608385ba (patch) | |
tree | 19e76b0116164ad7fd037b93f34e15ac297bb61a /test | |
parent | f74f15b95c7dd6b27cd415909cf644977ebb88c1 (diff) | |
download | relx-79bbf33cbd46c9a1beeae00424e14969608385ba.tar.gz relx-79bbf33cbd46c9a1beeae00424e14969608385ba.tar.bz2 relx-79bbf33cbd46c9a1beeae00424e14969608385ba.zip |
fix modules thta still were using format_error/1
Diffstat (limited to 'test')
-rw-r--r-- | test/rlx_depsolver_tests.erl | 18 | ||||
-rw-r--r-- | test/rlx_discover_SUITE.erl | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/test/rlx_depsolver_tests.erl b/test/rlx_depsolver_tests.erl index 7cbe831..8917db7 100644 --- a/test/rlx_depsolver_tests.erl +++ b/test/rlx_depsolver_tests.erl @@ -137,7 +137,7 @@ fail_test() -> Ret = rlx_depsolver:solve(Dom0, [{app1, "0.1"}]), %% We do this to make sure all errors can be formated. - _ = rlx_depsolver:format_error(Ret), + _ = rlx_depsolver:format_error(Ret, []), ?assertMatch({error, [{[{[{app1,{{0,1},{[],[]}}}], [{app1,{{0,1},{[],[]}}},[[{app2,{{0,2},{[],[]}}}]]]}], @@ -215,7 +215,7 @@ conflicting_failing_test() -> {app5, [{"2.0.0", []}, {"6.0.0", []}]}]), Ret = rlx_depsolver:solve(Dom0, [app1, app3]), - _ = rlx_depsolver:format_error(Ret), + _ = rlx_depsolver:format_error(Ret, []), ?assertMatch({error, [{[{[app1], [{app1,{{3,0},{[],[]}}}, @@ -351,7 +351,7 @@ filter_versions_test() -> Ret = rlx_depsolver:filter_packages(Packages, [{"foo", "1.0.0", '~~~~'} | Cons]), - _ = rlx_depsolver:format_error(Ret), + _ = rlx_depsolver:format_error(Ret, []), ?assertMatch({error, {invalid_constraints, [{<<"foo">>,{{1,0,0},{[],[]}},'~~~~'}]}}, Ret). @@ -370,11 +370,11 @@ missing_test() -> {"0.2", []}, {"0.3", []}]}]), Ret1 = rlx_depsolver:solve(Dom0, [{app4, "0.1"}, {app3, "0.1"}]), - _ = rlx_depsolver:format_error(Ret1), + _ = rlx_depsolver:format_error(Ret1, []), ?assertMatch({error,{unreachable_package,app4}}, Ret1), Ret2 = rlx_depsolver:solve(Dom0, [{app1, "0.1"}]), - _ = rlx_depsolver:format_error(Ret2), + _ = rlx_depsolver:format_error(Ret2, []), ?assertMatch({error,{unreachable_package,app4}}, Ret2). @@ -387,7 +387,7 @@ binary_test() -> World), [<<"foo">>]), - _ = rlx_depsolver:format_error(Ret), + _ = rlx_depsolver:format_error(Ret, []), ?assertMatch({error, [{[{[<<"foo">>],[{<<"foo">>,{{1,2,3},{[],[]}}}]}], [{{<<"foo">>,{{1,2,3},{[],[]}}}, @@ -408,7 +408,7 @@ doesnt_exist_test() -> Constraints = [{<<"foo">>,[{<<"1.2.3">>, [{<<"bar">>, <<"2.0.0">>, gt}]}]}], World = rlx_depsolver:add_packages(rlx_depsolver:new_graph(), Constraints), Ret = rlx_depsolver:solve(World, [<<"foo">>]), - _ = rlx_depsolver:format_error(Ret), + _ = rlx_depsolver:format_error(Ret, []), ?assertMatch({error,{unreachable_package,<<"bar">>}}, Ret). %% @@ -428,7 +428,7 @@ not_new_enough_test() -> {<<"bar">>, [{<<"2.0.0">>, []}]}], World = rlx_depsolver:add_packages(rlx_depsolver:new_graph(), Constraints), Ret = rlx_depsolver:solve(World, [<<"foo">>]), - _ = rlx_depsolver:format_error(Ret), + _ = rlx_depsolver:format_error(Ret, []), ?assertMatch({error, [{[{[<<"foo">>],[{<<"foo">>,{{1,2,3},{[],[]}}}]}], [{{<<"foo">>,{{1,2,3},{[],[]}}}, @@ -449,7 +449,7 @@ impossible_dependency_test() -> [{<<"foo">>, [{<<"1.2.3">>,[{ <<"bar">>, <<"2.0.0">>, gt}]}]}, {<<"bar">>, [{<<"2.0.0">>, [{ <<"foo">>, <<"3.0.0">>, gt}]}]}]), Ret = rlx_depsolver:solve(World, [<<"foo">>]), - _ = rlx_depsolver:format_error(Ret), + _ = rlx_depsolver:format_error(Ret, []), ?assertMatch({error, [{[{[<<"foo">>],[{<<"foo">>,{{1,2,3},{[],[]}}}]}], [{{<<"foo">>,{{1,2,3},{[],[]}}}, diff --git a/test/rlx_discover_SUITE.erl b/test/rlx_discover_SUITE.erl index 2db8e4d..4a3b817 100644 --- a/test/rlx_discover_SUITE.erl +++ b/test/rlx_discover_SUITE.erl @@ -77,8 +77,8 @@ normal_case(Config) -> || _ <- lists:seq(1, 100)]], State0 = rlx_state:put(proplists:get_value(state, Config), default_libs, false), - {ok, State1} = providers:new(rlx_prv_discover, State0), - DiscoverProvider = providers:get_provider(discover, rlx_state:providers(State1)), + {ok, State1} = providers:new(rlx_prv_app_discover, State0), + DiscoverProvider = providers:get_provider(app_discover, rlx_state:providers(State1)), {ok, State2} = providers:do(DiscoverProvider, State1), lists:foreach(fun(App) -> @@ -114,10 +114,10 @@ no_beam_case(Config) -> AppDir = filename:join([LibDir2, BadName]), write_app_file(AppDir, BadName, BadVsn), State0 = proplists:get_value(state, Config), - %% Deliberately disable release discovery when running `rlx_prv_discover` + %% Deliberately disable release discovery when running `rlx_prv_app_discover` State1 = rlx_state:put(State0, disable_rel_discovery, true), - {ok, State2} = providers:new(rlx_prv_discover, State1), - DiscoverProvider = providers:get_provider(discover, rlx_state:providers(State2)), + {ok, State2} = providers:new(rlx_prv_app_discover, State1), + DiscoverProvider = providers:get_provider(app_discover, rlx_state:providers(State2)), ?assertMatch({ok, _}, providers:do(DiscoverProvider, State2)). @@ -146,8 +146,8 @@ bad_ebin_case(Config) -> ok = filelib:ensure_dir(Filename), ok = ec_file:write_term(Filename, get_bad_app_metadata(BadName, BadVsn)), State0 = proplists:get_value(state, Config), - {ok, State1} = providers:new(rlx_prv_discover, State0), - DiscoverProvider = providers:get_provider(discover, rlx_state:providers(State1)), + {ok, State1} = providers:new(rlx_prv_app_discover, State0), + DiscoverProvider = providers:get_provider(app_discover, rlx_state:providers(State1)), {ok, State2} = providers:do(DiscoverProvider, State1), ?assertMatch([], [App || App <- rlx_state:available_apps(State2), BadName =:= rlx_app_info:name(App)]). @@ -172,8 +172,8 @@ shallow_app_discovery(Config) -> State0 = rlx_state:put(proplists:get_value(state, Config), default_libs, false), State1 = rlx_state:put(State0, enable_shallow_app_discovery, true), - {ok, State2} = providers:new(rlx_prv_discover, State1), - DiscoverProvider = providers:get_provider(discover, rlx_state:providers(State2)), + {ok, State2} = providers:new(rlx_prv_app_discover, State1), + DiscoverProvider = providers:get_provider(app_discover, rlx_state:providers(State2)), {ok, State3} = providers:do(DiscoverProvider, State2), lists:foreach(fun(App) -> ?assertMatch(true, lists:member(App, rlx_state:available_apps(State3))) |