Skip to content

21 empty selector tests - #28

Open
hulkoba wants to merge 11 commits into
port-python-testsfrom
21-empty-selector-tests
Open

21 empty selector tests#28
hulkoba wants to merge 11 commits into
port-python-testsfrom
21-empty-selector-tests

Conversation

@hulkoba

@hulkoba hulkoba commented Nov 19, 2025

Copy link
Copy Markdown

Overview

This PR ports 21-empty-selector-tests from python to elixir

Testing recommendations

Run:

make elixir
or
make elixir tests=test/elixir/test/mango/21_empty_selector_tests.exs
and
make elixir-search tests=test/elixir/test/mango/21_empty_selector_tests.exs

Related Issues or Pull Requests

Checklist

  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • Documentation changes were made in the src/docs folder
  • Documentation changes were backported (separated PR) to affected branches

@hulkoba
hulkoba force-pushed the 21-empty-selector-tests branch from 05f5478 to c476253 Compare November 19, 2025 11:06
@hulkoba
hulkoba marked this pull request as ready for review November 19, 2025 11:06
@hulkoba
hulkoba force-pushed the 21-empty-selector-tests branch from c476253 to a618917 Compare November 19, 2025 11:09
@hulkoba
hulkoba force-pushed the 21-empty-selector-tests branch from a618917 to 08f3b9b Compare November 19, 2025 11:25
@hulkoba
hulkoba force-pushed the port-python-tests branch 4 times, most recently from c413a13 to 25f1f55 Compare November 19, 2025 14:21
@hulkoba
hulkoba force-pushed the 21-empty-selector-tests branch from 08f3b9b to 022eb39 Compare November 24, 2025 09:43
assert resp["index"]["type"] == unquote(index_type)

{:ok, docs} = MangoDatabase.find(unquote(db), selector)
assert length(docs) == 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert length(docs) == 0
assert Enum.empty?(docs)

assert resp["index"]["type"] == unquote(index_type)

{:ok, docs} = MangoDatabase.find(unquote(db), selector)
assert length(docs) == 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert length(docs) == 0
assert Enum.empty?(docs)

assert resp["index"]["type"] == unquote(index_type)

{:ok, docs} = MangoDatabase.find(unquote(db), selector)
assert length(docs) == 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert length(docs) == 0
assert Enum.empty?(docs)

assert resp["index"]["type"] == unquote(index_type)

{:ok, docs} = MangoDatabase.find(unquote(db), selector)
assert length(docs) == 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert length(docs) == 0
assert Enum.empty?(docs)

assert resp["index"]["type"] == unquote(index_type)

{:ok, docs} = MangoDatabase.find(unquote(db), %{"$or" => []})
assert length(docs) == 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert length(docs) == 0
assert Enum.empty?(docs)

@ninetteadhikari

Copy link
Copy Markdown
Member

good from me ✔️

jcoglan and others added 7 commits December 2, 2025 13:27
Running the search tests with Clouseau 3.0 amplified the flakiness
for containers which is making hard to use the CI -- disable those
for now until they root cause is investigated and a fix is
provided.  Mind that native builds, e.g. FreeBSD and Windows are
still there to catch Search-related regressions.
@hulkoba
hulkoba force-pushed the 21-empty-selector-tests branch from 4f2ade3 to ba96200 Compare December 3, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants