fix(test): drop redundant user.email index setup
ensure_tables already adds the email index; a second add_table_index
aborted with {already_exists,user,3} and failed the suite setup.
This commit is contained in:
@@ -6,12 +6,8 @@
|
|||||||
|
|
||||||
setup() ->
|
setup() ->
|
||||||
eh_test_support:start_mnesia(),
|
eh_test_support:start_mnesia(),
|
||||||
|
%% email index comes from eh_test_support:ensure_indexes/1
|
||||||
eh_test_support:ensure_tables(?TABLES),
|
eh_test_support:ensure_tables(?TABLES),
|
||||||
case mnesia:add_table_index(user, email) of
|
|
||||||
{atomic, ok} -> ok;
|
|
||||||
{aborted, {already_exists, user, email}} -> ok;
|
|
||||||
{aborted, Reason} -> error({add_index_failed, Reason})
|
|
||||||
end,
|
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
cleanup(_) ->
|
cleanup(_) ->
|
||||||
|
|||||||
@@ -12,12 +12,8 @@
|
|||||||
|
|
||||||
setup() ->
|
setup() ->
|
||||||
eh_test_support:start_mnesia(),
|
eh_test_support:start_mnesia(),
|
||||||
|
%% email index comes from eh_test_support:ensure_indexes/1
|
||||||
eh_test_support:ensure_tables(?TABLES),
|
eh_test_support:ensure_tables(?TABLES),
|
||||||
case mnesia:add_table_index(user, email) of
|
|
||||||
{atomic, ok} -> ok;
|
|
||||||
{aborted, {already_exists, user, email}} -> ok;
|
|
||||||
{aborted, Reason} -> error({add_index_failed, Reason})
|
|
||||||
end,
|
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
cleanup(_) ->
|
cleanup(_) ->
|
||||||
|
|||||||
Reference in New Issue
Block a user