From dfa668f21102ef5ac4cc5c2384e91b8d256513b5 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 26 Sep 2015 14:01:06 -0500 Subject: only upgrade children and transitive children of dep being upgraded This commit replaces the method of upgrading by unlocking all transitive deps by one that utilizes the parent element of each app to only unlock transitive deps of children of the top level deps being upgraded. Additionally the run function of upgrade_SUITE is modified to only create the mock updates before the upgrade provider is run, instead of before any provider is run, which would cause improper behavior in install_deps. --- test/rebar_upgrade_SUITE.erl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/rebar_upgrade_SUITE.erl b/test/rebar_upgrade_SUITE.erl index 54f16da..d9cd49a 100644 --- a/test/rebar_upgrade_SUITE.erl +++ b/test/rebar_upgrade_SUITE.erl @@ -561,13 +561,19 @@ run(Config) -> {error, Term} -> {error, Term}; _ -> {ok, Unlocks} end, - apply(?config(mock_update, Config), []), + + meck:new(rebar_prv_upgrade, [passthrough]), + meck:expect(rebar_prv_upgrade, do, fun(S) -> + apply(?config(mock_update, Config), []), + meck:passthrough([S]) + end), NewRebarConf = rebar_test_utils:create_config(?config(apps, Config), [{deps, ?config(next_top_deps, Config)}]), {ok, NewRebarConfig} = file:consult(NewRebarConf), rebar_test_utils:run_and_check( Config, NewRebarConfig, ["upgrade", App], Expectation - ). + ), + meck:unload(rebar_prv_upgrade). novsn_pkg(Config) -> apply(?config(mock, Config), []), -- cgit v1.1