aboutsummaryrefslogtreecommitdiffstats
path: root/test/rclt_release_SUITE.erl
diff options
context:
space:
mode:
authorEric B Merritt <[email protected]>2013-04-09 20:50:37 -0700
committerEric B Merritt <[email protected]>2013-04-09 20:50:37 -0700
commitc003f00bfc33df3c561ee773f760c6d03e77ec14 (patch)
tree2d1febcc52525606bfd027cfcfb1d9ca48bca095 /test/rclt_release_SUITE.erl
parent10eb471cda3609156e21af93e04522543fb674c0 (diff)
downloadrelx-c003f00bfc33df3c561ee773f760c6d03e77ec14.tar.gz
relx-c003f00bfc33df3c561ee773f760c6d03e77ec14.tar.bz2
relx-c003f00bfc33df3c561ee773f760c6d03e77ec14.zip
make sure that top level releases are also supported
Add matching test
Diffstat (limited to 'test/rclt_release_SUITE.erl')
-rw-r--r--test/rclt_release_SUITE.erl31
1 files changed, 29 insertions, 2 deletions
diff --git a/test/rclt_release_SUITE.erl b/test/rclt_release_SUITE.erl
index c774619..d4f9aac 100644
--- a/test/rclt_release_SUITE.erl
+++ b/test/rclt_release_SUITE.erl
@@ -33,7 +33,8 @@
make_goalless_release/1,
make_depfree_release/1,
make_invalid_config_release/1,
- make_relup_release/1]).
+ make_relup_release/1,
+ make_one_app_top_level_release/1]).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
@@ -61,7 +62,8 @@ all() ->
[make_release, make_scriptless_release, make_overridden_release,
make_implicit_config_release, make_rerun_overridden_release,
overlay_release, make_goalless_release, make_depfree_release,
- make_invalid_config_release, make_relup_release].
+ make_invalid_config_release, make_relup_release,
+ make_one_app_top_level_release].
make_release(Config) ->
LibDir1 = proplists:get_value(lib1, Config),
@@ -564,6 +566,31 @@ make_relup_release(Config) ->
?assert(lists:member({goal_app_2, "0.0.3"}, AppSpecs)),
?assert(lists:member({lib_dep_1, "0.0.1", load}, AppSpecs)).
+
+make_one_app_top_level_release(Config) ->
+ LibDir1 = proplists:get_value(lib1, Config),
+ {ok, AppInfo} = create_app(LibDir1, "goal_app_1", "0.0.1", [stdlib,kernel], []),
+ AppDir = rcl_app_info:dir(AppInfo),
+ ConfigFile = filename:join([AppDir, "relcool.config"]),
+ write_config(ConfigFile,
+ [{release, {foo, "0.0.1"},
+ [{goal_app_1, "0.0.1"}]}]),
+
+ OutputDir = filename:join([AppDir,
+ create_random_name("relcool-output")]),
+
+ {ok, Cwd} = file:get_cwd(),
+ ok = file:set_cwd(AppDir),
+ {ok, State} = relcool:do(undefined, undefined, [], [], 2,
+ OutputDir, ConfigFile),
+ ok = file:set_cwd(Cwd),
+ [{{foo, "0.0.1"}, Release}] = ec_dictionary:to_list(rcl_state:releases(State)),
+ AppSpecs = rcl_release:applications(Release),
+ ?assert(lists:keymember(stdlib, 1, AppSpecs)),
+ ?assert(lists:keymember(kernel, 1, AppSpecs)),
+ ?assert(lists:member({goal_app_1, "0.0.1"}, AppSpecs)).
+
+
%%%===================================================================
%%% Helper Functions
%%%===================================================================