Skip to content

Commit

Permalink
[#182] Normalizing tests, postponing ES to #187
Browse files Browse the repository at this point in the history
  • Loading branch information
elbrujohalcon committed Aug 28, 2015
1 parent 215f341 commit a226367
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion test/sumo_basic_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ delete(_Config) ->
run_all_stores(fun delete_module/1).

check_proper_dates(_Config) ->
run_all_stores(fun check_proper_dates_module/1).
lists:foreach(
fun check_proper_dates_module/1,
sumo_test_utils:people_with_proper_dates()).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Internal functions
Expand Down
6 changes: 4 additions & 2 deletions test/sumo_config_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@

-spec all() -> [atom()].
all() ->
Exports = ?MODULE:module_info(exports),
[F || {F, _} <- Exports, not lists:member(F, ?EXCLUDED_FUNS)].
case lists:member(sumo_test_people_mysql, sumo_test_utils:all_people()) of
true -> [check_overrun_handler];
false -> []
end.

-spec init_per_suite(config()) -> config().
init_per_suite(Config) ->
Expand Down
8 changes: 4 additions & 4 deletions test/sumo_test_people_elasticsearch.erl
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
-spec sumo_schema() -> sumo:schema().
sumo_schema() ->
Fields =
[sumo:new_field(id, integer, [id, auto_increment]),
[sumo:new_field(id, string, [id]),
sumo:new_field(name, string, [{length, 255}, not_null]),
sumo:new_field(last_name, string, [{length, 255}, not_null]),
sumo:new_field(age, integer),
sumo:new_field(address, string, [{length, 255}]),
sumo:new_field(birthdate, date),
sumo:new_field(created_at, datetime)
sumo:new_field(address, string, [{length, 255}]) %,
% sumo:new_field(birthdate, date),
% sumo:new_field(created_at, datetime)
],
sumo:new_schema(?MODULE, Fields).
2 changes: 1 addition & 1 deletion test/sumo_test_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ sleep_if_required(Module) ->

-spec people_with_proper_dates() -> [atom()].
people_with_proper_dates() ->
all_people() -- [sumo_test_people_postgres].
all_people() -- [sumo_test_people_elasticsearch].

0 comments on commit a226367

Please sign in to comment.