summaryrefslogtreecommitdiff
path: root/test/rebar_upgrade_SUITE.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-09-26 14:01:06 -0500
committerTristan Sloughter <t@crashfast.com>2015-09-26 14:14:52 -0500
commitdfa668f21102ef5ac4cc5c2384e91b8d256513b5 (patch)
treebda3bed3f9eaece15610775206f842031bc0c490 /test/rebar_upgrade_SUITE.erl
parent6a4b5428b3fa67ba6b1fdb5dd6cc896128b331c0 (diff)
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.
Diffstat (limited to 'test/rebar_upgrade_SUITE.erl')
-rw-r--r--test/rebar_upgrade_SUITE.erl10
1 files changed, 8 insertions, 2 deletions
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), []),