summaryrefslogtreecommitdiff
path: root/test/rebar_test_utils.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-01-20 01:39:43 +0000
committerFred Hebert <mononcqc@ferd.ca>2015-02-11 21:57:58 +0000
commitb94afdfa2d44b0cb1489234c7746cd72f85a167d (patch)
treec76a7c7bd3bd25ee369f843de83b1200aaeeb90c /test/rebar_test_utils.erl
parent2fd6f43c020555435c758ffe84ffe56a632387d8 (diff)
WIP
Test that all the correct locks are set for an upgrade run. Now to actually re-run the install deps and prove it works
Diffstat (limited to 'test/rebar_test_utils.erl')
-rw-r--r--test/rebar_test_utils.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/rebar_test_utils.erl b/test/rebar_test_utils.erl
index 6095d6d..af40995 100644
--- a/test/rebar_test_utils.erl
+++ b/test/rebar_test_utils.erl
@@ -53,7 +53,17 @@ run_and_check(Config, RebarConfig, Command, Expect) ->
?assertEqual({error, Reason}, Res);
{ok, Expected} ->
{ok, _} = Res,
- check_results(AppDir, Expected)
+ check_results(AppDir, Expected);
+ {unlocked, Expected} ->
+ ct:pal("Expected: ~p", [Expected]),
+ {ok, ResState} = Res,
+ Locks = rebar_state:lock(ResState),
+ ct:pal("Locks: ~p", [Locks]),
+ ?assertEqual(lists:sort(Expected),
+ lists:sort([rebar_app_info:name(Lock)
+ || Lock <- Locks]));
+ return ->
+ Res
end.
%% @doc Creates a dummy application including: