Skip to content

Add $lookup aggregation stage tests#148

Open
danielfrankcom wants to merge 5 commits intodocumentdb:mainfrom
danielfrankcom:pr/lookup
Open

Add $lookup aggregation stage tests#148
danielfrankcom wants to merge 5 commits intodocumentdb:mainfrom
danielfrankcom:pr/lookup

Conversation

@danielfrankcom
Copy link
Copy Markdown
Collaborator

This change adds tests for the $lookup aggregation stage operator.

As part of this change I had to add a new LookupTestCase class which extends StageTestCase, in order to deal with some complexity that is specific to this operator. The tests need a way to define and reference foreign documents, which means we need to create those documents as part of the test run, and replace a foreign reference sentinel is the actual pipeline definition.

Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@danielfrankcom danielfrankcom requested a review from a team as a code owner April 29, 2026 17:54
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Apr 29, 2026
@documentdb-triage-tool
Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: compatibility test, enhancement
Project fields suggested: Component test-coverage · Priority P2 · Effort XL · Status Needs Review
Confidence: 0.85 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (8001+2 LOC, 23 files); LLM: Adds new test cases for the $lookup aggregation stage, including a new LookupTestCase class extending StageTestCase to handle foreign document references — new test coverage within one component, under 500 LOC.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

Remove LookupPrecedenceTestCase and message content assertions.
Drop 4 test cases that relied on error message content to
distinguish precedence. Remaining 6 cases use distinct error codes
and follow the standard setup_lookup/build_lookup_command pattern.

Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility test Compatibility test related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants