summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-08-15 21:31:01 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-08-15 21:31:01 -0500
commite49e59d09a73d4a27e1bd18ee59dd1b9ac6522bb (patch)
tree480ca2b447e0ebe3006b434880f87b68eb3658ab /test
parent75364c2cd6282d1d039330ea7e46cac93cba1846 (diff)
parentd4bca1d6c5b7ce4dd128c4f20fbfe7a1cf52cc69 (diff)
Merge pull request #706 from tsloughter/pkg_deps_order
install package deps in same level/profile order as src deps
Diffstat (limited to 'test')
-rw-r--r--test/rebar_deps_SUITE.erl4
-rw-r--r--test/rebar_install_deps_SUITE.erl15
2 files changed, 14 insertions, 5 deletions
diff --git a/test/rebar_deps_SUITE.erl b/test/rebar_deps_SUITE.erl
index 004d50b..bfb6a1f 100644
--- a/test/rebar_deps_SUITE.erl
+++ b/test/rebar_deps_SUITE.erl
@@ -239,8 +239,8 @@ sub_app_deps(Config) ->
newly_added_dep(Config) ->
AppDir = ?config(apps, Config),
Deps = rebar_test_utils:expand_deps(git, [{"a", "1.0.0", []}
- ,{"b", "1.0.0", [{"c", "1.0.0", []}]}
- ,{"c", "2.0.0", []}]),
+ ,{"b", "1.0.0", [{"c", "1.0.0", []}]}
+ ,{"c", "2.0.0", []}]),
mock_git_resource:mock([{deps, rebar_test_utils:flat_deps(Deps)}]),
Name = rebar_test_utils:create_random_name("app_"),
diff --git a/test/rebar_install_deps_SUITE.erl b/test/rebar_install_deps_SUITE.erl
index be42e68..4e6c3d9 100644
--- a/test/rebar_install_deps_SUITE.erl
+++ b/test/rebar_install_deps_SUITE.erl
@@ -241,6 +241,9 @@ default_profile(Config) ->
AppDir = ?config(apps, Config),
{ok, Apps} = Expect = ?config(expect, Config),
rebar_test_utils:run_and_check(
+ Config, RebarConfig, ["lock"], Expect
+ ),
+ rebar_test_utils:run_and_check(
Config, RebarConfig, ["as", "profile", "lock"], Expect
),
check_warnings(error_calls(), ?config(warnings, Config), ?config(deps_type, Config)),
@@ -253,6 +256,9 @@ default_profile(Config) ->
|| {dep, App} <- Apps],
%% A second run to another profile also links default to the right spot
rebar_test_utils:run_and_check(
+ Config, RebarConfig, ["lock"], Expect
+ ),
+ rebar_test_utils:run_and_check(
Config, RebarConfig, ["as", "other", "lock"], Expect
),
[?assertMatch({ok, #file_info{type=directory}}, % somehow symlinks return dirs
@@ -296,10 +302,13 @@ nondefault_profile(Config) ->
nondefault_pick_highest(Config) ->
{ok, RebarConfig} = file:consult(?config(rebarconfig, Config)),
- %AppDir = ?config(apps, Config),
+ rebar_test_utils:run_and_check(
+ Config, RebarConfig, ["lock"],
+ {ok, [{dep, "B"}, {lock, "B"}, {lock, "C", "1"}, {dep, "C", "1"}], "default"}
+ ),
rebar_test_utils:run_and_check(
Config, RebarConfig, ["as", "nondef", "lock"],
- {ok, [{dep, "B"}, {lock, "B"}, {dep, "C", "2"}], "nondef"}
+ {ok, [{dep, "B"}, {lock, "B"}, {lock, "C", "1"}, {dep, "C", "2"}], "nondef"}
),
rebar_test_utils:run_and_check(
Config, RebarConfig, ["lock"],
@@ -307,7 +316,7 @@ nondefault_pick_highest(Config) ->
),
rebar_test_utils:run_and_check(
Config, RebarConfig, ["as", "nondef", "lock"],
- {ok, [{dep, "B"}, {lock, "B"}, {dep, "C", "2"}], "nondef"}
+ {ok, [{dep, "B"}, {lock, "B"}, {lock, "C", "1"}, {dep, "C", "2"}], "nondef"}
).
run(Config) ->