|
|
@ -42,8 +42,10 @@ 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, []}), |
|
|
@ -52,8 +54,9 @@ unlock(Config) -> |
|
|
|
|
|
|
|
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) -> |
|
|
|