Add collMod command tests#626
Conversation
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage, test-framework); effort from diff stats (6398+0 LOC, 25 files); LLM: Adds new test coverage for the collMod command, expanding compatibility test suite for an existing feature. If a label is wrong, remove it manually and ping |
| error_code=test.error_code, | ||
| msg=test.msg, | ||
| raw_res=True, | ||
| ) |
There was a problem hiding this comment.
Can we add unknown field at case sensitive tests for top level field as well?
{"collMod": ctx.collection, "unknownField": "hello"} → UNRECOGNIZED_COMMAND_FIELD_ERROR
{"collMod": ctx.collection, "CappedSize": 100000} → UNRECOGNIZED_COMMAND_FIELD_ERROR
| # concern (a number above 1, an unrecognized string tag, the empty string, or | ||
| # null) is rejected up front on a standalone with a BadValue error, since a | ||
| # standalone can never satisfy a quorum concern. | ||
| COLLMOD_WRITE_CONCERN_W_QUORUM_STANDALONE_ERROR_TESTS: list[CommandTestCase] = [ |
There was a problem hiding this comment.
should this mark with standalone marker?
| @@ -0,0 +1,410 @@ | |||
| """Tests for collMod validator.""" | |||
There was a problem hiding this comment.
can we add
- $jsonSchema in validator to validate the real documents
- An empty validator
{}clearing a previously-set validator (reset to no validation)
| @@ -0,0 +1,353 @@ | |||
| """Tests for collMod index expireAfterSeconds.""" | |||
There was a problem hiding this comment.
can we add test to collmod expireAtseconds on special index types, including:
- Wildcard index
- hashed index
- geospatial index
- text index
- vector index
This change adds tests for the
collModcollection command.Closes #350