[SERVER-51662] Add matcher helper to match request BSON object Created: 15/Oct/20  Updated: 29/Oct/23  Resolved: 17/Nov/20

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.9.0

Type: New Feature Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Siyuan Zhou
Resolution: Fixed Votes: 0
Labels: mock-network, pm-1791_milestone-D
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2020-11-16, Repl 2020-11-30
Participants:

 Description   

It's common to match the fields of a request, like

{ "find": "oplog.rs" }

, we need to make that easier. We could integrate query expression matcher to the mock framework. It may look like

mock.expect(BSON("find" << "oplog.rs"), <response>).times(1);



 Comments   
Comment by Githook User [ 17/Nov/20 ]

Author:

{'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com', 'username': 'visualzhou'}

Message: SERVER-51662 Add matcher helper to match request BSON object
Branch: master
https://github.com/mongodb/mongo/commit/8c25afee505a1661ce4156d95f7f3d6dd6d2b291

Comment by Siyuan Zhou [ 29/Oct/20 ]

Here's an example of using query framework to match a BSON object.

Generated at Thu Feb 08 05:26:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.