aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2013-11-18 11:03:06 +0100
committerJosé Valim <[email protected]>2013-11-22 18:29:04 +0100
commit7eee9d200bf3c244f2f307861cc9fc6d35d9d5a2 (patch)
treeb1c125471d27705add2723aa75a45fb87fe5f525 /test
parent10620765c5028c24d57caba20b8e86b98351e3a5 (diff)
downloadrelx-7eee9d200bf3c244f2f307861cc9fc6d35d9d5a2.tar.gz
relx-7eee9d200bf3c244f2f307861cc9fc6d35d9d5a2.tar.bz2
relx-7eee9d200bf3c244f2f307861cc9fc6d35d9d5a2.zip
Properly detect the default release and fail on conflicts
Closes #93
Diffstat (limited to 'test')
-rw-r--r--test/rlx_release_SUITE.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/rlx_release_SUITE.erl b/test/rlx_release_SUITE.erl
index d16dce9..ae38928 100644
--- a/test/rlx_release_SUITE.erl
+++ b/test/rlx_release_SUITE.erl
@@ -93,12 +93,15 @@ make_release(Config) ->
write_config(ConfigFile,
[{release, {foo, "0.0.1"},
[goal_app_1,
- goal_app_2]}]),
+ goal_app_2]},
+ {release, {foo, "0.0.2"},
+ [goal_app_1,
+ goal_app_2]}]),
OutputDir = filename:join([proplists:get_value(data_dir, Config),
create_random_name("relx-output")]),
{ok, State} = relx:do(undefined, undefined, [], [LibDir1], 3,
OutputDir, ConfigFile),
- [{{foo, "0.0.1"}, Release}] = ec_dictionary:to_list(rlx_state:realized_releases(State)),
+ [{{foo, "0.0.2"}, Release}] = ec_dictionary:to_list(rlx_state:realized_releases(State)),
AppSpecs = rlx_release:applications(Release),
?assert(lists:keymember(stdlib, 1, AppSpecs)),
?assert(lists:keymember(kernel, 1, AppSpecs)),
@@ -133,6 +136,10 @@ make_extend_release(Config) ->
[goal_app_2]}]),
OutputDir = filename:join([proplists:get_value(data_dir, Config),
create_random_name("relx-output")]),
+
+ ?assertMatch({multiple_release_names,foo_test,foo},
+ catch relx:do(undefined, undefined, [], [LibDir1], 3, OutputDir, ConfigFile)),
+
{ok, State} = relx:do(foo_test, undefined, [], [LibDir1], 3,
OutputDir, ConfigFile),
[{{foo_test, "0.0.1"}, Release}] = ec_dictionary:to_list(rlx_state:realized_releases(State)),