aboutsummaryrefslogtreecommitdiffstats
path: root/test/rclt_release_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/rclt_release_SUITE.erl')
-rw-r--r--test/rclt_release_SUITE.erl33
1 files changed, 30 insertions, 3 deletions
diff --git a/test/rclt_release_SUITE.erl b/test/rclt_release_SUITE.erl
index e92772e..baf2fcd 100644
--- a/test/rclt_release_SUITE.erl
+++ b/test/rclt_release_SUITE.erl
@@ -29,7 +29,8 @@
make_overridden_release/1,
make_rerun_overridden_release/1,
make_implicit_config_release/1,
- overlay_release/1]).
+ overlay_release/1,
+ make_goalless_release/1]).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
@@ -56,7 +57,7 @@ init_per_testcase(_, Config) ->
all() ->
[make_release, make_scriptless_release, make_overridden_release,
make_implicit_config_release, make_rerun_overridden_release,
- overlay_release].
+ overlay_release, make_goalless_release].
make_release(Config) ->
LibDir1 = proplists:get_value(lib1, Config),
@@ -262,7 +263,7 @@ make_rerun_overridden_release(Config) ->
[ConfigFile]),
%% Now we run it again to see if it failse.
- {ok, State} = relcool:do(Cwd, undefined, undefined, [], [LibDir1], 2,
+ {ok, State} = relcool:do(Cwd,undefined, undefined, [], [LibDir1], 2,
OutputDir, [{OverrideAppName, OverrideAppDir}],
[ConfigFile]),
@@ -414,6 +415,32 @@ overlay_release(Config) ->
?assertEqual("yahoo/bar",
proplists:get_value(yahoo3, TemplateData)).
+make_goalless_release(Config) ->
+ LibDir1 = proplists:get_value(lib1, Config),
+ [(fun({Name, Vsn}) ->
+ create_app(LibDir1, Name, Vsn, [kernel, stdlib], [])
+ end)(App)
+ ||
+ App <-
+ [{create_random_name("lib_app1_"), create_random_vsn()}
+ || _ <- lists:seq(1, 100)]],
+
+ create_app(LibDir1, "goal_app_1", "0.0.1", [stdlib,kernel,non_goal_1], []),
+ create_app(LibDir1, "lib_dep_1", "0.0.1", [], []),
+ create_app(LibDir1, "goal_app_2", "0.0.1", [stdlib,kernel,goal_app_1,non_goal_2], []),
+ create_app(LibDir1, "non_goal_1", "0.0.1", [stdlib,kernel], [lib_dep_1]),
+ create_app(LibDir1, "non_goal_2", "0.0.1", [stdlib,kernel], []),
+
+ ConfigFile = filename:join([LibDir1, "relcool.config"]),
+ write_config(ConfigFile,
+ [{release, {foo, "0.0.1"},
+ []}]),
+ OutputDir = filename:join([proplists:get_value(data_dir, Config),
+ create_random_name("relcool-output")]),
+ ?assertMatch({error,{rcl_prv_release,no_goals_specified}},
+ relcool:do(undefined, undefined, [], [LibDir1], 2,
+ OutputDir, [ConfigFile])).
+
%%%===================================================================
%%% Helper Functions
%%%===================================================================