CDRIVER-2899 incorporates CRUD tests and a mock server test for read/write concern inheritance, but we'd do well to add additional tests for mongoc_database_aggregate(). These can be ported over from existing collection tests (and adapted to use OP_MSG) where it makes sense. Some ideas:
- batchSize and/or bypassDocumentValidation options
- read preference inheritance, and overriding to primary on $out
- behavior for invalid read preferences
- serverId selection
Since both helpers use common code in mongoc-aggregate.c, read preference inheritance is probably the most useful test case. It may also make more sense to repurpose this ticket to extract many of the current collection tests to a new test-mongoc-aggregate.c file. Then the database and collection test files can only concern themselves with inheritance.
- has to be done after
-
CDRIVER-2899 Add a database aggregate helper
- Closed