Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6836

Tests in test/integration/node-specific/auto_encrypter.test.ts that require crypt_shared to not be present are not run

    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      • test/integration/node-specific/auto_encrypter.test.ts
        In the test file above there are tests that check whether or not we launch mongocryptd along with other options relating to the process handling (vs library handling). These tests are currently not running because the mongocyrptd tasks use only the tests run by "npm run test:csfle". Which is only "test/integration/client-side-encryption".

      We should either just run all our tests under the cryptd tasks or find a way to make sure we're running all the relevant tests to the subject of mongocryptd.

        crypt_shared library
          autoSpawn
            ✔ should autoSpawn a mongocryptd on init by default (521ms)
            ✔ should not attempt to kick off mongocryptd on a normal error
            1) should restore the mongocryptd and retry once if a MongoNetworkTimeoutError is experienced
            2) should propagate error if MongoNetworkTimeoutError is experienced twice in a row
            ✔ should return a useful message if mongocryptd fails to autospawn (10005ms)
          noAutoSpawn
            ✔ should not spawn mongocryptd on startup if mongocryptdBypassSpawn is true
            ✔ should not spawn mongocryptd on startup if bypassAutoEncryption is true
            ✔ should not spawn mongocryptd on startup if bypassQueryAnalysis is true
            3) should not spawn a mongocryptd or retry on a server selection error if mongocryptdBypassSpawn: true
      

      User Experience

      • What is the desired/expected outcome for the user once this ticket is implemented?
      • If bug: What is the number of impacted customers? How severe is the impact? Is anyone blocked or broken?

      Dependencies

      • upstream and/or downstream requirements and timelines to bear in mind

      Risks/Unknowns

      • What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
      • Is there an opportunity for better cross-driver alignment or testing in this area?
      • Is there an opportunity to improve existing documentation on this subject?

      Acceptance Criteria

      Implementation Requirements

      • Rename the describe block to be more desrciptive
      • Change mongocryptd tests to run all tests instead of just fle

      Testing Requirements

      • Make sure the tests above actually run and pass in CI

      Documentation Requirements

      • DOCSP ticket, API docs, etc

      Follow Up Requirements

      • additional tickets to file, required releases, etc
      • if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: