[DRIVERS-938] Always assert $db in FLE CRUD tests Created: 28/Feb/20  Updated: 30/Mar/20  Resolved: 30/Mar/20

Status: Closed
Project: Drivers
Component/s: Client Side Encryption
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Oleg Pudeyev (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Looking at a CRUD FLE test such as https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/basic.yml#L24, it appears that $db assertions in command monitoring events are only specified for some of the events. Specifically, key vault client operations appear to have $db specified, and top-level client operations appear to not have it specified.

Since these tests specify the database names that are to be used for the entire test (https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/basic.yml#L3), it seems that the tests should be capable of specifying $db for each command monitoring event.

If so it seems that having $db be specified for all command monitoring events will achieve the following benefits:

1. It will make the spec test runner more uniform since it be able to always assert $db rather than containing logic to assert $db conditionally;
2. It will catch instances of the driver publishing command monitoring events with the wrong indicated database name.


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