summaryrefslogtreecommitdiff
path: root/test/rebar_upgrade_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/rebar_upgrade_SUITE.erl')
-rw-r--r--test/rebar_upgrade_SUITE.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/rebar_upgrade_SUITE.erl b/test/rebar_upgrade_SUITE.erl
index cfe1d8a..22fb14d 100644
--- a/test/rebar_upgrade_SUITE.erl
+++ b/test/rebar_upgrade_SUITE.erl
@@ -610,7 +610,14 @@ novsn_pkg(Config) ->
rewrite_locks({ok, Expectations}, Config) ->
AppDir = ?config(apps, Config),
LockFile = filename:join([AppDir, "rebar.lock"]),
- {ok, [Locks]} = file:consult(LockFile),
+ Locks = case ?config(deps_type, Config) of
+ git ->
+ {ok, [LockData]} = file:consult(LockFile),
+ LockData;
+ pkg ->
+ {ok, [{_Vsn, LockData}|_]} = file:consult(LockFile),
+ LockData
+ end,
ExpLocks = [{list_to_binary(Name), Vsn}
|| {lock, Name, Vsn} <- Expectations],
NewLocks = lists:foldl(