You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2020/02/14 09:21:21 UTC
[couchdb] 04/05: Fix mango_idx tests
This is an automated email from the ASF dual-hosted git repository.
jaydoane pushed a commit to branch mango-eunit-test-fixes
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit caceed494bc67a372b265c33063d9537fc4f6d58
Author: Jay Doane <ja...@apache.org>
AuthorDate: Fri Feb 14 01:15:04 2020 -0800
Fix mango_idx tests
---
src/mango/src/mango_idx.erl | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/src/mango/src/mango_idx.erl b/src/mango/src/mango_idx.erl
index f1be029..b861d52 100644
--- a/src/mango/src/mango_idx.erl
+++ b/src/mango/src/mango_idx.erl
@@ -535,7 +535,8 @@ filter_opts([Opt | Rest]) ->
[Opt | filter_opts(Rest)].
-get_partial_filter_selector(#idx{def = Def}) when Def =:= all_docs; Def =:= undefined ->
+get_partial_filter_selector(#idx{def = Def})
+ when Def =:= all_docs; Def =:= undefined ->
undefined;
get_partial_filter_selector(#idx{def = {Def}}) ->
case proplists:get_value(<<"partial_filter_selector">>, Def) of
@@ -558,14 +559,18 @@ get_legacy_selector(Def) ->
-include_lib("eunit/include/eunit.hrl").
index(SelectorName, Selector) ->
- {
- idx,<<"mango_test_46418cd02081470d93290dc12306ebcb">>,
- <<"_design/57e860dee471f40a2c74ea5b72997b81dda36a24">>,
- <<"Selected">>,<<"json">>,
- {[{<<"fields">>,{[{<<"location">>,<<"asc">>}]}},
- {SelectorName,{Selector}}]},
- false,
- [{<<"def">>,{[{<<"fields">>,[<<"location">>]}]}}]
+ #idx{
+ dbname = <<"mango_test_46418cd02081470d93290dc12306ebcb">>,
+ ddoc = <<"_design/57e860dee471f40a2c74ea5b72997b81dda36a24">>,
+ name = <<"Selected">>,
+ type = <<"json">>,
+ def = {[
+ {<<"fields">>, {[{<<"location">>,<<"asc">>}]}},
+ {SelectorName, {Selector}}
+ ]},
+ partitioned = false,
+ opts = [{<<"def">>,{[{<<"fields">>,[<<"location">>]}]}}],
+ build_status = undefined
}.
get_partial_filter_all_docs_test() ->