This is an automated email from the ASF dual-hosted git repository. jan pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 1e8e9a0e91e159efc37470b74cd80ca482e57a28 Author: hulkoba <[email protected]> AuthorDate: Mon Nov 10 12:04:37 2025 +0100 refactor(test): 11 ignore design docs from python to elixir --- test/elixir/test/config/suite.elixir | 3 ++ .../test/mango/11_ignore_design_docs_test.exs | 33 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/test/elixir/test/config/suite.elixir b/test/elixir/test/config/suite.elixir index a9d58e823..b3fb95084 100644 --- a/test/elixir/test/config/suite.elixir +++ b/test/elixir/test/config/suite.elixir @@ -732,5 +732,8 @@ ], "BasicFindTest": [ "simple find" + ], + "IgnoreDesignDocsForAllDocsIndexTests": [ + "should not return design docs" ] } diff --git a/test/elixir/test/mango/11_ignore_design_docs_test.exs b/test/elixir/test/mango/11_ignore_design_docs_test.exs new file mode 100644 index 000000000..b6d90edcb --- /dev/null +++ b/test/elixir/test/mango/11_ignore_design_docs_test.exs @@ -0,0 +1,33 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +defmodule IgnoreDesignDocsForAllDocsIndexTests do + use CouchTestCase + + @db_name "ignore-design-docs" + + setup do + MangoDatabase.recreate(@db_name) + docs = [ + %{"_id" => "_design/my-design-doc"}, + %{"_id" => "54af50626de419f5109c962f", "user_id" => 0, "age" => 10, "name" => "Jimi"}, + %{"_id" => "54af50622071121b25402dc3", "user_id" => 1, "age" => 11, "name" => "Eddie"} + ] + MangoDatabase.save_docs(@db_name, docs) + :ok + end + + test "should not return design docs" do + {:ok, docs} = MangoDatabase.find(@db_name, %{"_id" => %{"$gte" => nil}}) + assert length(docs) == 2 + end +end
