aboutsummaryrefslogtreecommitdiffstats
path: root/test/rclt_release_SUITE.erl
diff options
context:
space:
mode:
authorEric <[email protected]>2012-12-28 13:00:34 -0500
committerEric <[email protected]>2012-12-28 13:00:34 -0500
commit3e295e146c960252af0008f1f13a7e40bcbdb929 (patch)
treee53dce219844ffb7e5f588d9b7840d650ad0ffb4 /test/rclt_release_SUITE.erl
parent39ff3c87aa0d6444e5c3d9ae03538d0f212d81e6 (diff)
downloadrelx-3e295e146c960252af0008f1f13a7e40bcbdb929.tar.gz
relx-3e295e146c960252af0008f1f13a7e40bcbdb929.tar.bz2
relx-3e295e146c960252af0008f1f13a7e40bcbdb929.zip
make sure file permissions are set correctly in overlay template/copy
Diffstat (limited to 'test/rclt_release_SUITE.erl')
-rw-r--r--test/rclt_release_SUITE.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/rclt_release_SUITE.erl b/test/rclt_release_SUITE.erl
index 848c129..593944e 100644
--- a/test/rclt_release_SUITE.erl
+++ b/test/rclt_release_SUITE.erl
@@ -34,6 +34,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("kernel/include/file.hrl").
+-include_lib("kernel/include/file.hrl").
suite() ->
[{timetrap,{seconds,30}}].
@@ -317,6 +318,8 @@ overlay_release(Config) ->
TemplateFile = filename:join([LibDir1, "test_template"]),
ok = file:write_file(TemplateFile, test_template_contents()),
+ {ok, FileInfo} = file:read_file_info(TemplateFile),
+ ok = file:write_file_info(TemplateFile, FileInfo#file_info{mode=8#00777}),
OutputDir = filename:join([proplists:get_value(data_dir, Config),
create_random_name("relcool-output")]),
@@ -338,12 +341,14 @@ overlay_release(Config) ->
?assert(ec_file:exists(filename:join([OutputDir, "foodir", "vars.config"]))),
?assert(ec_file:exists(filename:join([OutputDir, "yahoo", "vars.config"]))),
- TemplateData = case file:consult(filename:join([OutputDir, test_template_resolved])) of
+ TemplateData = case file:consult(filename:join([OutputDir, "test_template_resolved"])) of
{ok, Details} ->
Details;
Error ->
erlang:throw({failed_to_consult, Error})
end,
+ {ok, ReadFileInfo} = file:read_file_info(filename:join([OutputDir, "test_template_resolved"])),
+ ?assertEqual(8#100777, ReadFileInfo#file_info.mode),
?assertEqual(erlang:system_info(version),
proplists:get_value(erts_vsn, TemplateData)),