summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2017-11-21 15:06:29 -0500
committerFred Hebert <mononcqc@ferd.ca>2017-11-21 15:06:29 -0500
commit97fa184be132c3f19f7ee9f545c0cb1cf6811db1 (patch)
treec16678fd2ca8246131a5bcf2c8274bba1b5d9ea2 /test
parent0c801bc6c43ff58c8a6c1a3034c5414db3dd7a78 (diff)
parent02caf6297db344348f43b39dbe55b80420633d5f (diff)
Merge branch 'profile_dep_countertest' of https://github.com/lrascao/rebar3 into lrascao-profile_dep_countertest
Diffstat (limited to 'test')
-rw-r--r--test/rebar_compile_SUITE.erl15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/rebar_compile_SUITE.erl b/test/rebar_compile_SUITE.erl
index 1655336..62df7aa 100644
--- a/test/rebar_compile_SUITE.erl
+++ b/test/rebar_compile_SUITE.erl
@@ -40,6 +40,7 @@
clean_all/1,
override_deps/1,
profile_override_deps/1,
+ profile_deps/1,
deps_build_in_prod/1,
include_file_relative_to_working_directory/1,
include_file_in_src/1,
@@ -76,6 +77,7 @@ all() ->
parse_transform_test, erl_first_files_test, mib_test,
umbrella_mib_first_test, only_default_transitive_deps,
clean_all, override_deps, profile_override_deps, deps_build_in_prod,
+ profile_override_deps, profile_deps, deps_build_in_prod,
include_file_relative_to_working_directory, include_file_in_src,
include_file_relative_to_working_directory_test, include_file_in_src_test,
include_file_in_src_test_multiapp,
@@ -1307,6 +1309,19 @@ profile_override_deps(Config) ->
{ok, [{dep, "some_dep"},{dep_not_exist, "other_dep"}]}
).
+profile_deps(Config) ->
+ mock_git_resource:mock([{deps, [{some_dep, "0.0.1"},{other_dep, "0.0.1"}]}]),
+ Deps = rebar_test_utils:expand_deps(git, [{"some_dep", "0.0.1", [{"other_dep", "0.0.1", []}]}]),
+ TopDeps = rebar_test_utils:top_level_deps(Deps),
+
+ RebarConfig = [
+ {deps, TopDeps},
+ {profiles, [{a, []}]}],
+ rebar_test_utils:run_and_check(
+ Config, RebarConfig, ["as", "a", "compile"],
+ {ok, [{dep, "some_dep"},{dep, "other_dep"}]}
+ ).
+
%% verify a deps prod profile is used
%% tested by checking prod hooks run and outputs to default profile dir for dep
%% and prod deps are installed for dep