From fc2170f006485b5f9705a8ff5e90b92d431c7c2c Mon Sep 17 00:00:00 2001 From: Grigory Starinkin Date: Sun, 4 Nov 2018 13:48:38 +0000 Subject: allow specify additional providers via api and cli calls --- test/rlx_command_SUITE.erl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'test/rlx_command_SUITE.erl') diff --git a/test/rlx_command_SUITE.erl b/test/rlx_command_SUITE.erl index e0beec1..47ffdaf 100644 --- a/test/rlx_command_SUITE.erl +++ b/test/rlx_command_SUITE.erl @@ -27,7 +27,8 @@ lib_expansion_case/1, lib_fail_case/1, spec_parse_fail_case/1, - config_fail_case/1]). + config_fail_case/1, + provider_case/1]). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). @@ -42,7 +43,7 @@ end_per_suite(_Config) -> ok. all() -> - [normal_passing_case, lib_expansion_case, lib_fail_case, config_fail_case]. + [normal_passing_case, lib_expansion_case, lib_fail_case, config_fail_case, provider_case]. normal_passing_case(Config) -> DataDir = filename:join(proplists:get_value(priv_dir, Config), ?MODULE), @@ -111,3 +112,12 @@ config_fail_case(_Config) -> {ok, {Opts, Targets}} = getopt:parse(relx:opt_spec_list(), CmdLine), ?assertMatch({error, {_, {invalid_config_file, ConfigFile}}}, rlx_cmd_args:args2state(Opts, Targets)). + +provider_case(_Config) -> + CmdLine = ["--provider", "relx_provider_1", + "--provider", "relx_provider_2"], + {ok, {Opts, Targets}} = getopt:parse(relx:opt_spec_list(), CmdLine), + {ok, State} = rlx_cmd_args:args2state(Opts, Targets), + ?assertEqual( + [relx_provider_1, relx_provider_2], + proplists:get_value(add_providers, rlx_state:cli_args(State))). -- cgit v1.2.3 From f6abbf18842f9f8464e01e7e8c258741ca51adbf Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Tue, 14 May 2019 17:01:00 -0600 Subject: increase timetrap --- 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 e0beec1..46664ab 100644 --- a/test/rlx_command_SUITE.erl +++ b/test/rlx_command_SUITE.erl @@ -33,7 +33,7 @@ -include_lib("eunit/include/eunit.hrl"). suite() -> - [{timetrap,{seconds,30}}]. + [{timetrap,{seconds,120}}]. init_per_suite(Config) -> Config. -- cgit v1.2.3