aboutsummaryrefslogtreecommitdiffstats
path: root/test/rlx_command_SUITE.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2019-05-20 09:17:29 -0600
committerGitHub <[email protected]>2019-05-20 09:17:29 -0600
commitcca2a6cade4d97b5b36ca7c055d25677860bdc5d (patch)
tree6d56227c213afccd11b850e4f6e445630f7f13b2 /test/rlx_command_SUITE.erl
parent3420d80940eec374739d465c2f533d4917f83f42 (diff)
parentfc2170f006485b5f9705a8ff5e90b92d431c7c2c (diff)
downloadrelx-cca2a6cade4d97b5b36ca7c055d25677860bdc5d.tar.gz
relx-cca2a6cade4d97b5b36ca7c055d25677860bdc5d.tar.bz2
relx-cca2a6cade4d97b5b36ca7c055d25677860bdc5d.zip
Merge pull request #676 from velimir/providers-api
allow specify additional providers via api and cli calls
Diffstat (limited to 'test/rlx_command_SUITE.erl')
-rw-r--r--test/rlx_command_SUITE.erl14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/rlx_command_SUITE.erl b/test/rlx_command_SUITE.erl
index 46664ab..8dd2da8 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))).