diff options
author | Tristan Sloughter <[email protected]> | 2015-04-28 22:36:44 -0500 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2015-05-08 11:16:53 -0500 |
commit | 88d1f29257869b0de9369881236477163804125a (patch) | |
tree | c14b95ae8efdebcf074d314b6b0afb662f3454fb /test | |
parent | a36609536aaf7d98b5bd5d3364cab739dc6689b5 (diff) | |
download | relx-88d1f29257869b0de9369881236477163804125a.tar.gz relx-88d1f29257869b0de9369881236477163804125a.tar.bz2 relx-88d1f29257869b0de9369881236477163804125a.zip |
use mustache instead of erlydtl for overlays
Diffstat (limited to 'test')
-rw-r--r-- | test/rlx_release_SUITE.erl | 64 | ||||
-rw-r--r-- | test/rlx_test_utils.erl | 20 |
2 files changed, 6 insertions, 78 deletions
diff --git a/test/rlx_release_SUITE.erl b/test/rlx_release_SUITE.erl index 766eb40..c4c782b 100644 --- a/test/rlx_release_SUITE.erl +++ b/test/rlx_release_SUITE.erl @@ -497,18 +497,17 @@ overlay_release(Config) -> VarsFile1 = filename:join([LibDir1, "vars1.config"]), rlx_test_utils:write_config(VarsFile1, [{yahoo, "yahoo"}, - {yahoo2, [{foo, "bar"}]}, - {yahoo3, [{bar, "{{yahoo}}/{{yahoo2.foo}}"}]}, - {foo_dir, "foodir"}]), + {yahoo2, [{foo, "bar"}]}, + {foo_dir, "foodir"}]), VarsFile2 = filename:join([LibDir1, "vars2.config"]), rlx_test_utils:write_config(VarsFile2, [{google, "yahoo"}, - {yahoo2, [{foo, "foo"}]}, - OverlayVars3]), + {yahoo2, "foo"}, + OverlayVars3]), VarsFile3 = filename:join([LibDir1, "vars3.config"]), rlx_test_utils:write_config(VarsFile3, [{google, "yahoo"}, - {yahoo4, [{foo, "{{yahoo}}/{{yahoo2.foo}}4"}]}]), + {yahoo4, "{{yahoo}}/{{yahoo2}}4"}]), ok = rlx_util:mkdir_p(TestDirFull), ok = file:write_file(TestFileFull, rlx_test_utils:test_template_contents()), @@ -557,59 +556,6 @@ overlay_release(Config) -> proplists:get_value(release_version, TemplateData)), ?assertEqual(foo, proplists:get_value(release_name, TemplateData)), - ?assertEqual([kernel,stdlib,lib_dep_1,non_goal_2,non_goal_1, - goal_app_1,goal_app_2], - proplists:get_value(release_applications, TemplateData)), - ?assert(proplists:is_defined(std_version, TemplateData)), - ?assert(proplists:is_defined(kernel_version, TemplateData)), - ?assertEqual("0.0.1", - proplists:get_value(non_goal_1_version, TemplateData)), - ?assertEqual("0.0.1", - proplists:get_value(non_goal_2_version, TemplateData)), - ?assertEqual("0.0.1", - proplists:get_value(goal_app_1_version, TemplateData)), - ?assertEqual("0.0.1", - proplists:get_value(goal_app_2_version, TemplateData)), - ?assertEqual("0.0.1", - proplists:get_value(lib_dep_1, TemplateData)), - ?assert(proplists:is_defined(lib_dep_1_dir, TemplateData)), - ?assertEqual([stdlib,kernel], - proplists:get_value(lib_dep_1_active, TemplateData)), - ?assertEqual([], - proplists:get_value(lib_dep_1_library, TemplateData)), - ?assertEqual("false", - proplists:get_value(lib_dep_1_link, TemplateData)), - ?assertEqual("(3:debug)", - proplists:get_value(log, TemplateData)), - ?assertEqual(filename:join(OutputDir, "foo"), - proplists:get_value(output_dir, TemplateData)), - ?assertEqual(filename:join(OutputDir, "foo"), - proplists:get_value(target_dir, TemplateData)), - ?assertEqual([], - proplists:get_value(overridden, TemplateData)), - ?assertEqual([""], - proplists:get_value(goals, TemplateData)), - ?assert(proplists:is_defined(lib_dirs, TemplateData)), - ?assert(proplists:is_defined(config_file, TemplateData)), - ?assertEqual([""], - proplists:get_value(goals, TemplateData)), - ?assertEqual([], - proplists:get_value(sys_config, TemplateData)), - ?assert(proplists:is_defined(root_dir, TemplateData)), - ?assertEqual(foo, - proplists:get_value(default_release_name, TemplateData)), - ?assertEqual("0.0.1", - proplists:get_value(default_release_version, TemplateData)), - ?assertEqual("foo-0.0.1", - proplists:get_value(default_release, TemplateData)), - ?assertEqual("yahoo", - proplists:get_value(yahoo, TemplateData)), - ?assertEqual("foo", - proplists:get_value(yahoo2_foo, TemplateData)), - ?assertEqual("foodir", - proplists:get_value(foo_dir, TemplateData)), - ?assertEqual("yahoo/foo", - proplists:get_value(yahoo3, TemplateData)), ?assertEqual("yahoo/foo4", proplists:get_value(yahoo4, TemplateData)), ?assertEqual("yahoo", diff --git a/test/rlx_test_utils.erl b/test/rlx_test_utils.erl index 644c49f..4e0fc0d 100644 --- a/test/rlx_test_utils.erl +++ b/test/rlx_test_utils.erl @@ -65,34 +65,16 @@ test_template_contents() -> "{release_name, {{release_name}}}.\n" "{rel_vsn, \"{{release_version}}\"}.\n" "{release_version, \"{{release_version}}\"}.\n" - "{release_applications, [{{ release_applications|join:\", \" }}]}.\n" - "{std_version, \"{{release.stdlib.version}}\"}.\n" - "{kernel_version, \"{{release.kernel.version}}\"}.\n" - "{non_goal_1_version, \"{{release.non_goal_1.version}}\"}.\n" - "{non_goal_2_version, \"{{release.non_goal_2.version}}\"}.\n" - "{goal_app_1_version, \"{{release.goal_app_1.version}}\"}.\n" - "{goal_app_2_version, \"{{release.goal_app_2.version}}\"}.\n" - "{lib_dep_1, \"{{release.lib_dep_1.version}}\"}.\n" - "{lib_dep_1_dir, \"{{release.lib_dep_1.dir}}\"}.\n" - "{lib_dep_1_active, [{{ release.lib_dep_1.active_dependencies|join:\", \" }}]}.\n" - "{lib_dep_1_library, [{{ release.lib_dep_1.library_dependencies|join:\", \" }}]}.\n" - "{lib_dep_1_link, \"{{release.lib_dep_1.link}}\"}.\n" "{log, \"{{log}}\"}.\n" "{output_dir, \"{{output_dir}}\"}.\n" "{target_dir, \"{{target_dir}}\"}.\n" - "{overridden, [{{ overridden|join:\", \" }}]}.\n" - "{goals, [\"{{ goals|join:\", \" }}\"]}.\n" - "{lib_dirs, [\"{{ lib_dirs|join:\", \" }}\"]}.\n" "{config_file, \"{{ config_file }}\"}.\n" - "{providers, [{{ providers|join:\", \" }}]}.\n" "{sys_config, \"{{sys_config}}\"}.\n" "{root_dir, \"{{root_dir}}\"}.\n" "{default_release_name, {{default_release_name}}}.\n" "{default_release_version, \"{{default_release_version}}\"}.\n" "{default_release, \"{{default_release}}\"}.\n" + "{yahoo4, \"{{yahoo4}}\"}.\n" "{yahoo, \"{{yahoo}}\"}.\n" - "{yahoo2_foo, \"{{yahoo2.foo}}\"}.\n" "{foo_dir, \"{{foo_dir}}\"}.\n" - "{yahoo3, \"{{yahoo3.bar}}\"}.\n" - "{yahoo4, \"{{yahoo4.foo}}\"}.\n" "{google, \"{{google}}\"}.\n". |