Added indexes tests for $createIndexes#139
Added indexes tests for $createIndexes#139vic-tsang wants to merge 2 commits intodocumentdb:mainfrom
Conversation
| indexes=({"key": {"a": 1}, "name": "a_cu", "unique": True, "collation": {"locale": "en"}},), | ||
| msg="Collation + unique should succeed", | ||
| ), | ||
| ] |
There was a problem hiding this comment.
Missing important coverage:
- Compound index with
partialFilterExpression— currently partial is only tested on single-field indexes. partialFilterExpressionwith$nor/$not— not supported per docs; should error (currently missing from errors file).partialFilterExpressionreferencing a field not in the index key — allowed, but worth testing.- Hidden index +
dropIndexes— hidden indexes can still be dropped; no test. - Creating an index that matches an existing hidden one — behavior may differ.
There was a problem hiding this comment.
Hidden index + dropIndexes
it should be covered in dorpIndex test, and it already covered.Please remove it here
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage, test-framework); effort from diff stats (2114+0 LOC, 11 files); LLM: Adds new compatibility test cases for $createIndexes, expanding test coverage for an important index management feature. If a label is wrong, remove it manually and ping |
Signed-off-by: Victor Tsang <vitsangp@amazon.com>
2ee51b0 to
829aabe
Compare
This PR contains
Assumptions: I didn't want to convolute the test with listIndexes to verify if the index is indeed created. I have assumed the numIndexesBefore and numIndexesAfter is working correctly after the api call.
Ref: