summaryrefslogtreecommitdiff
path: root/test/rebar_unlock_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/rebar_unlock_SUITE.erl')
-rw-r--r--test/rebar_unlock_SUITE.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/rebar_unlock_SUITE.erl b/test/rebar_unlock_SUITE.erl
index 8dbdb3a..a8d1400 100644
--- a/test/rebar_unlock_SUITE.erl
+++ b/test/rebar_unlock_SUITE.erl
@@ -33,7 +33,7 @@ pkgunlock(Config) ->
rebar_test_utils:run_and_check(Config, [], ["unlock", "cf,certifi"], {ok, []}),
?assertEqual(Locks -- ["bbmustache","cf","certifi"], read_locks(Config)),
?assertEqual(Hashes -- ["bbmustache","cf","certifi"], read_hashes(Config)),
- rebar_test_utils:run_and_check(Config, [], ["unlock", string:join(Locks,",")], {ok, []}),
+ rebar_test_utils:run_and_check(Config, [], ["unlock", rebar_string:join(Locks,",")], {ok, []}),
?assertEqual({error, enoent}, read_locks(Config)),
?assertEqual({error, enoent}, read_hashes(Config)),
ok.
@@ -42,18 +42,21 @@ unlock(Config) ->
Locks = read_locks(Config),
rebar_test_utils:run_and_check(Config, [], ["unlock", "fakeapp"], {ok, []}),
Locks = read_locks(Config),
- rebar_test_utils:run_and_check(Config, [], ["unlock", "uuid"], {ok, []}),
+ {ok, State} = rebar_test_utils:run_and_check(Config, [], ["unlock", "uuid"], return),
?assertEqual(Locks -- ["uuid"], read_locks(Config)),
+ ?assert(false =:= lists:keyfind(<<"uuid">>, 1, rebar_state:get(State, {locks, default}))),
+ ?assert(false =/= lists:keyfind(<<"itc">>, 1, rebar_state:get(State, {locks, default}))),
rebar_test_utils:run_and_check(Config, [], ["unlock", "gproc,itc"], {ok, []}),
?assertEqual(Locks -- ["uuid","gproc","itc"], read_locks(Config)),
- rebar_test_utils:run_and_check(Config, [], ["unlock", string:join(Locks,",")], {ok, []}),
+ rebar_test_utils:run_and_check(Config, [], ["unlock", rebar_string:join(Locks,",")], {ok, []}),
?assertEqual({error, enoent}, read_locks(Config)),
ok.
unlock_all(Config) ->
[_|_] = read_locks(Config),
- rebar_test_utils:run_and_check(Config, [], ["unlock"], {ok, []}),
+ {ok, State} = rebar_test_utils:run_and_check(Config, [], ["unlock"], return),
?assertEqual({error, enoent}, read_locks(Config)),
+ ?assertEqual([], rebar_state:get(State, {locks, default})),
ok.
read_locks(Config) ->