From 5d1634448cb89cd4c0b6f49e757ef281d5e71205 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 24 Apr 2015 02:54:37 +0000 Subject: handle transitive deps being promoted --- test/rebar_upgrade_SUITE.erl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/rebar_upgrade_SUITE.erl b/test/rebar_upgrade_SUITE.erl index 14186be..1dc0af2 100644 --- a/test/rebar_upgrade_SUITE.erl +++ b/test/rebar_upgrade_SUITE.erl @@ -10,7 +10,7 @@ groups() -> pair_a, pair_b, pair_ab, pair_c, pair_all, triplet_a, triplet_b, triplet_c, tree_a, tree_b, tree_c, tree_c2, tree_ac, tree_all, - delete_d]}, + delete_d, promote]}, {git, [], [{group, all}]}, {pkg, [], [{group, all}]}]. @@ -351,7 +351,17 @@ upgrades(delete_d) -> ], ["A","B", "C"], %% upgrade vs. new tree - {"", [{"A","2"}, "B", "C"]}}. + {"", [{"A","2"}, "B", "C"]}}; +upgrades(promote) -> + {[{"A", "1", [{"C", "1", []}]}, + {"B", "1", [{"D", "1", []}]} + ], + [{"A", "2", [{"C", "2", []}]}, + {"B", "2", [{"D", "2", []}]}, + {"C", "3", []} + ], + ["A","B","C","D"], + {"C", [{"A","1"},{"C","3"},{"B","1"},{"D","1"}]}}. %% TODO: add a test that verifies that unlocking files and then %% running the upgrade code is enough to properly upgrade things. @@ -414,6 +424,7 @@ tree_c(Config) -> run(Config). tree_c2(Config) -> run(Config). tree_ac(Config) -> run(Config). tree_all(Config) -> run(Config). +promote(Config) -> run(Config). delete_d(Config) -> meck:new(rebar_log, [no_link, passthrough]), -- cgit v1.1