Skip to content

Added update tests for setOnInsert#576

Open
vic-tsang wants to merge 2 commits into
documentdb:mainfrom
vic-tsang:update/setOnInsert/tests
Open

Added update tests for setOnInsert#576
vic-tsang wants to merge 2 commits into
documentdb:mainfrom
vic-tsang:update/setOnInsert/tests

Conversation

@vic-tsang

Copy link
Copy Markdown
Collaborator

This PR contains:

  • update tests for $setOnInsert

Ref:

Signed-off-by: Victor [C] Tsang <vitsangp@amazon.com>
@vic-tsang vic-tsang requested a review from a team as a code owner June 8, 2026 17:59
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jun 8, 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 L · Status Needs Review
Confidence: 0.85 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (952+0 LOC, 10 files); LLM: Adds new update operator test cases for $setOnInsert, expanding test coverage for an existing feature.

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.

Signed-off-by: Victor Tsang <vitsangp@amazon.com>
@vic-tsang vic-tsang requested a review from manojnks June 10, 2026 22:10
@@ -0,0 +1,126 @@
"""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Minor] Three open PRs (#566, #570, #576) each create this same file with different contents. Whichever merges first will land its version; the other two will hit merge conflicts and need rebase. Consider coordinating with the authors of #566 and #570 to land one canonical file.

msg="Should preserve Decimal128 -0",
),
UpdateTestCase(
id="null_vs_missing",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Minor] The case ID and message claim a "null vs missing" distinction, but the assertion only verifies field: None is present — it doesn't actually exercise the missing path. Either rename to preserves_null (drop the "vs missing" framing), or add a sibling test using {$exists: True} filter to prove the field is stored as null and not missing.

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.

3 participants