Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(NODE-6836): make broken mongocryptd tests run in CI #4497

Merged
merged 9 commits into from
Apr 7, 2025
Merged

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Apr 2, 2025

Description

What is changing?

This PR

  • Configures the mongocryptd CI variants to run all tests, not just the FLE tests in npm run check:csfle.
  • Fixes up the tests in integration/auto_encrypter.test.ts
    • Some tests were testing crypt_shared behavior. I've moved these into their own suite.
    • Some tests were duplicates of CSFLE prose test 8, which we have implemented in client_side_encryption.prose.test.js.
    • Per Daria's comment on the ticket, I reworked the tests to use an auto encrypted client instead of instantiating AutoEncrypters directly and stubbing state machine methods. This removed all non-mongocryptd related mocking from the tests. The remaining stubs are necessary to simulate particular errors from mongocryptd but they no longer use the mock data.

I believe the remaining tests in this file are valuable - I'm not aware of coverage for this behavior anywhere else in our suite. We probably have implicit coverage (for example - mongocryptd is spawned in our mongocryptd variants in CI and those tests pass), but having explicit tests stating the expected behavior is nice-to-have, so I'm leaving them in. The respawn behavior tests is not tested anywhere else though.

Is there new documentation needed for these changes?

What is the motivation for this change?

Release Highlight

Fill in title or leave empty for no highlight

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson marked this pull request as ready for review April 4, 2025 14:18
@baileympearson baileympearson requested a review from a team as a code owner April 4, 2025 14:18
@durran durran self-assigned this Apr 7, 2025
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Apr 7, 2025
nbbeeken
nbbeeken previously approved these changes Apr 7, 2025
@durran durran merged commit 85124c2 into main Apr 7, 2025
30 checks passed
@durran durran deleted the NODE-6836 branch April 7, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants