diff options
author | joewilliams <joe@joetify.com> | 2011-10-18 10:30:56 -0700 |
---|---|---|
committer | Henrik Nord <henrik@erlang.org> | 2011-10-20 09:50:15 +0200 |
commit | 66be346a3b0f04bb010608ad6125ecec501384c2 (patch) | |
tree | 1dd3cb18a81fd5fa106e007fba0a951c55bb85ab /lib/sasl/test | |
parent | 02ec67177b2f5d2de371362e5bb3c9b9771fb0b8 (diff) | |
download | otp-66be346a3b0f04bb010608ad6125ecec501384c2.tar.gz otp-66be346a3b0f04bb010608ad6125ecec501384c2.tar.bz2 otp-66be346a3b0f04bb010608ad6125ecec501384c2.zip |
Add release_handler:which_releases/1
This is an extension to which_releases that allows a user to specify the
status of the releases they wish to be returned. For instance it allows
for quickly determining which release is 'permanent' without the need of
parsing the entire release list.
Diffstat (limited to 'lib/sasl/test')
-rw-r--r-- | lib/sasl/test/release_handler_SUITE.erl | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index af2183bfff..286aff9bb0 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -58,7 +58,8 @@ cases() -> [otp_2740, otp_2760, otp_5761, otp_9402, otp_9417, otp_9395_check_old_code, otp_9395_check_and_purge, otp_9395_update_many_mods, otp_9395_rm_many_mods, - instructions, eval_appup, supervisor_which_children_timeout]. + instructions, eval_appup, supervisor_which_children_timeout, + release_handler_which_releases]. groups() -> [{release,[], @@ -546,6 +547,32 @@ supervisor_which_children_timeout(cleanup, Conf) -> stop_node(node_name(supervisor_which_children_timeout)). %%----------------------------------------------------------------- +%% release_handler:which_releases/0 and 1 test +%%----------------------------------------------------------------- +release_handler_which_releases(Conf) -> + PrivDir = priv_dir(Conf), + Dir = filename:join(PrivDir,"release_handler_which_releases"), + DataDir = ?config(data_dir,Conf), + LibDir = filename:join([DataDir,release_handler_timeouts]), + + Rel1 = create_and_install_fake_first_release(Dir,[{dummy,"0.1",LibDir}]), + + {ok, Node} = t_start_node(release_handler_which_releases, Rel1, []), + Releases0 = rpc:call(Node, release_handler, which_releases, []), + Releases1 = rpc:call(Node, release_handler, which_releases, [permanent]), + Releases2 = rpc:call(Node, release_handler, which_releases, [old]), + + 1 = length(Releases0), + 1 = length(Releases1), + 0 = length(Releases2), + + ?t:format("release_handler:which_releases/0: ~p~n", [Releases0]), + ?t:format("release_handler:which_releases/1: ~p~n", [Releases1]), + ?t:format("release_handler:which_releases/1: ~p~n", [Releases2]), + + ok. + +%%----------------------------------------------------------------- %% Ticket: OTP-2740 %% Slogan: vsn not numeric doesn't work so good in release_handling %%----------------------------------------------------------------- |