From 7d3626779ce5716055b31eed76feb81a9fcb2210 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Wed, 7 May 2014 19:32:17 -0500 Subject: refactor cli args and config file var merging --- test/rlx_command_SUITE.erl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/rlx_command_SUITE.erl') diff --git a/test/rlx_command_SUITE.erl b/test/rlx_command_SUITE.erl index 2e1ef1d..e26e0ad 100644 --- a/test/rlx_command_SUITE.erl +++ b/test/rlx_command_SUITE.erl @@ -61,15 +61,17 @@ normal_passing_case(Config) -> "-n", RelName, "-v", RelVsn, "-o", Outdir], {ok, {Opts, Targets}} = getopt:parse(relx:opt_spec_list(), CmdLine), {ok, State} = rlx_cmd_args:args2state(Opts, Targets), + {ConfigProvider, {ok, State1}} = rlx_provider:new(rlx_prv_config, State), + {ok, State2} = rlx_provider:do(ConfigProvider, State1), ?assertMatch([Lib1, Lib2], - rlx_state:lib_dirs(State)), - ?assertMatch(Outdir, rlx_state:base_output_dir(State)), + rlx_state:lib_dirs(State2)), + ?assertMatch(Outdir, rlx_state:output_dir(State2)), ?assertMatch([{app1,{{33,33},{[],[<<"build4">>]}},lte}, {app2, {{33,22},{[],[]}}, {{45,22},{[],[<<"build">>,21]}}, between}], - rlx_state:goals(State)). + rlx_state:goals(State2)). lib_expansion_case(Config) -> DataDir = proplists:get_value(data_dir, Config), @@ -81,8 +83,10 @@ lib_expansion_case(Config) -> CmdLine = ["-l", filename:join(DataDir, "*")], {ok, {Opts, Targets}} = getopt:parse(relx:opt_spec_list(), CmdLine), {ok, State} = rlx_cmd_args:args2state(Opts, Targets), + {ConfigProvider, {ok, State1}} = rlx_provider:new(rlx_prv_config, State), + {ok, State2} = rlx_provider:do(ConfigProvider, State1), ?assertMatch([Lib1, Lib2], - rlx_state:lib_dirs(State)). + rlx_state:lib_dirs(State2)). lib_fail_case(Config) -> DataDir = proplists:get_value(data_dir, Config), -- cgit v1.2.3 From dd55959854069553b40f2bc2f2f7c5c7fc7c5a94 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 9 May 2014 08:45:24 -0500 Subject: refactor tar and relup commands to own providers --- test/rlx_command_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/rlx_command_SUITE.erl') diff --git a/test/rlx_command_SUITE.erl b/test/rlx_command_SUITE.erl index e26e0ad..c34ed88 100644 --- a/test/rlx_command_SUITE.erl +++ b/test/rlx_command_SUITE.erl @@ -65,7 +65,7 @@ normal_passing_case(Config) -> {ok, State2} = rlx_provider:do(ConfigProvider, State1), ?assertMatch([Lib1, Lib2], rlx_state:lib_dirs(State2)), - ?assertMatch(Outdir, rlx_state:output_dir(State2)), + ?assertMatch(Outdir, rlx_state:base_output_dir(State2)), ?assertMatch([{app1,{{33,33},{[],[<<"build4">>]}},lte}, {app2, -- cgit v1.2.3