-
Notifications
You must be signed in to change notification settings - Fork 7
/
conditional_logic_SUITE.erl
52 lines (44 loc) · 1.14 KB
/
conditional_logic_SUITE.erl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
-module(conditional_logic_SUITE).
%% CT
-export([
all/0,
init_per_suite/1,
end_per_suite/1
]).
%% Test Cases
-include_lib("mixer/include/mixer.hrl").
-mixin([
{sumo_conditionals_test_helper, [
dates/1,
backward_compatibility/1,
or_conditional/1,
and_conditional/1,
not_null_conditional/1,
null_conditional/1,
deeply_nested/1
]}
]).
-define(EXCLUDED_FUNS, [
all,
module_info,
init_per_suite,
end_per_suite
]).
-type config() :: [{atom(), term()}].
%%%=============================================================================
%%% Common Test
%%%=============================================================================
-spec all() -> [atom()].
all() ->
Exports = ?MODULE:module_info(exports),
[F || {F, _} <- Exports, not lists:member(F, ?EXCLUDED_FUNS)].
-spec init_per_suite(config()) -> config().
init_per_suite(Config) ->
{ok, _} = sumo_db_riak:start(),
ok = sumo_conditionals_test_helper:init_store(people),
_ = timer:sleep(5000),
[{name, people}, {people_with_like, true} | Config].
-spec end_per_suite(config()) -> config().
end_per_suite(Config) ->
ok = sumo_db_riak:stop(),
Config.