Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-938

Always assert $db in FLE CRUD tests

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor - P4 Minor - P4
    • None
    • Client Side Encryption
    • None

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: