Add query and write tests for bulkWrite#630
Conversation
Signed-off-by: Victor [C] Tsang <vitsangp@amazon.com>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage); effort from diff stats (3039+48 LOC, 12 files); LLM: Adds new query and write test cases for bulkWrite operations, expanding test coverage for an existing feature area. If a label is wrong, remove it manually and ping |
|
Missing: delete on view. The "update_on_view" test verifies updates are rejected, but the delete path is a separate op discriminator and should also be validated. |
| }, | ||
| expected={"ok": 1.0, "nMatched": 1, "nModified": 1}, | ||
| msg="bulkWrite update should accept an aggregation pipeline", | ||
| ), |
There was a problem hiding this comment.
Missing: replacement-style update (updateMods with no $ operators). The bulkWrite spec supports three update modes — operator ({$set: ...}), pipeline ([{$set: ...}]), and replacement ({x: 99}). Operator and pipeline are tested here, but replacement is absent. This is a distinct server code path where the entire document body is replaced (non-_id fields removed).
| @@ -0,0 +1,608 @@ | |||
| """Tests for bulkWrite error and rejection cases.""" | |||
There was a problem hiding this comment.
Missing: arrayFilters success path. test_bulkWrite_errors.py verifies invalid arrayFilters produce
errors, but there's no test proving that a valid arrayFilters + $[identifier] update modifies the
correct nested elements.
This PR contains:
Ref: