[CDRIVER-4374] Only allow extra fields when matching root documents in unified spec tests Created: 02/May/22  Updated: 28/Oct/23  Resolved: 16/May/22

Status: Closed
Project: C Driver
Component/s: libmongoc, tests
Affects Version/s: None
Fix Version/s: 1.22.0, 1.22.0-beta0

Type: Bug Priority: Unknown
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by CDRIVER-4329 Do not permit extra fields when match... Closed
Related
is related to CDRIVER-4329 Do not permit extra fields when match... Closed
is related to CDRIVER-4199 Add support for the comment field to ... Closed

 Description   

In runner.centity_map_match is called with allow_extra=false (here), which seemingly conflicts with Allowing Extra Fields in Root-level Documents. This was responsible for a test failure I ran into while implementing CDRIVER-4199 (in find-comment.yml the test only matches the _id field of a selected document, despite it also containing an x field).

This is somewhat related to CDRIVER-4329, although that had to do APM command/reply assertions and passing allow_extra=true unnecessarily when matching nested fields.



 Comments   
Comment by Githook User [ 16/May/22 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: CDRIVER-4374 only allow extra fields when matching root docs
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/9ac26895637ada61305e430dcdefae7ad1ebf052

Comment by Jeremy Mikola [ 03/May/22 ]

https://github.com/mongodb/mongo-c-driver/pull/982

Generated at Wed Feb 07 21:20:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.