Skip to content

Commit

Permalink
Added kernel network config for documentation purposes. Removed eunit…
Browse files Browse the repository at this point in the history
…_opts. Verbose output is worse than default output, as it doesn't show failures at the end. Eunit_logs is not useful. Added eunit.coverdata to coverage stats. Silenced added test case
  • Loading branch information
Albert Schimpf committed Nov 4, 2019
1 parent cb677ac commit aefb101
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ compile-utils: compile
done

test:
mkdir -p eunit_logs
${REBAR} eunit skip_deps=true

coverage:
Expand Down
6 changes: 6 additions & 0 deletions config/network.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@
{antidote_stats, [
{metrics_port, 3001}
]}

%% possible to restrict distributed Erlang ports
%% {kernel, [
%% {inet_dist_listen_min, 9100},
%% {inet_dist_listen_max, 9100}
%% ]}
].
4 changes: 1 addition & 3 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
]}.


{eunit_opts, [verbose, {report, {eunit_surefire, [{dir, "eunit_logs/"}]}}]}.

{dialyzer, [{warnings, [
error_handling,
race_conditions,
Expand Down Expand Up @@ -173,5 +171,5 @@

{cover_enabled, true}.
{cover_export_enabled, true}.
{coveralls_coverdata, "logs/*/all.coverdata"}.
{coveralls_coverdata, ["logs/*/all.coverdata", "_build/test/cover/eunit.coverdata"]}.
{coveralls_service_name, "travis-ci"}.
3 changes: 3 additions & 0 deletions src/antidote_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ stop(_State) ->

%% Throw error if data dir is a file
data_dir_is_a_file_test() ->
{ok, Level} = maps:find(level, logger:get_primary_config()),
logger:set_primary_config(level, emergency),
application:set_env(antidote, data_dir, "tmpfile"),
ok = file:write_file("tmpfile", <<"hello">>),
{error, invalid_data_dir} = (catch validate_data_dir()),
logger:set_primary_config(level, Level),
ok = file:delete("tmpfile").
-endif.

0 comments on commit aefb101

Please sign in to comment.