aboutsummaryrefslogtreecommitdiffstats
path: root/test/rlx_release_SUITE.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2013-09-13 20:48:47 -0500
committerTristan Sloughter <[email protected]>2013-09-13 20:48:47 -0500
commitd02dd684dd685538c113da22f123b0850bb4f940 (patch)
treeff7c2ec1202abc30a446227ae5d2b357e42a5e44 /test/rlx_release_SUITE.erl
parent99f94d4514878cee51c38fd3d838d4076133566e (diff)
downloadrelx-d02dd684dd685538c113da22f123b0850bb4f940.tar.gz
relx-d02dd684dd685538c113da22f123b0850bb4f940.tar.bz2
relx-d02dd684dd685538c113da22f123b0850bb4f940.zip
support copying full directories in overlays
Diffstat (limited to 'test/rlx_release_SUITE.erl')
-rw-r--r--test/rlx_release_SUITE.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/rlx_release_SUITE.erl b/test/rlx_release_SUITE.erl
index ccf5a8f..aea28f2 100644
--- a/test/rlx_release_SUITE.erl
+++ b/test/rlx_release_SUITE.erl
@@ -383,6 +383,11 @@ overlay_release(Config) ->
ConfigFile = filename:join([LibDir1, "relx.config"]),
OverlayVars = filename:join([LibDir1, "vars.config"]),
Template = filename:join([LibDir1, "test_template"]),
+ TestDir = "first_test_dir",
+ TestFile = "test_file",
+ TestDirFull = filename:join([LibDir1, TestDir]),
+ TestFileFull = filename:join(TestDirFull, TestFile),
+ SecondTestDir = "second_test_dir",
write_config(ConfigFile,
[{overlay_vars, OverlayVars},
{overlay, [{mkdir, "{{target_dir}}/fooo"},
@@ -390,6 +395,8 @@ overlay_release(Config) ->
"{{target_dir}}/{{foo_dir}}/vars.config"},
{copy, OverlayVars,
"{{target_dir}}/{{yahoo}}/"},
+ {copy, TestDirFull,
+ "{{target_dir}}/"++SecondTestDir++"/"},
{template, Template,
"{{target_dir}}/test_template_resolved"}]},
{release, {foo, "0.0.1"},
@@ -402,6 +409,9 @@ overlay_release(Config) ->
{yahoo3, [{bar, "{{yahoo}}/{{yahoo2.foo}}"}]},
{foo_dir, "foodir"}]),
+ ok = rlx_util:mkdir_p(TestDirFull),
+ ok = file:write_file(TestFileFull, test_template_contents()),
+
TemplateFile = filename:join([LibDir1, "test_template"]),
ok = file:write_file(TemplateFile, test_template_contents()),
{ok, FileInfo} = file:read_file_info(TemplateFile),
@@ -426,6 +436,8 @@ overlay_release(Config) ->
?assert(ec_file:exists(filename:join(OutputDir, "fooo"))),
?assert(ec_file:exists(filename:join([OutputDir, "foodir", "vars.config"]))),
?assert(ec_file:exists(filename:join([OutputDir, "yahoo", "vars.config"]))),
+ io:format("DirFile ~p~n", [filename:join([OutputDir, SecondTestDir, TestDir, TestFile])]),
+ ?assert(ec_file:exists(filename:join([OutputDir, SecondTestDir, TestDir, TestFile]))),
TemplateData = case file:consult(filename:join([OutputDir, "test_template_resolved"])) of
{ok, Details} ->