Skip to content

DRIVERS-3470 case and diacritic text explicit encryption tests#1931

Open
mdb-ad wants to merge 9 commits into
mongodb:masterfrom
mdb-ad:case-tests
Open

DRIVERS-3470 case and diacritic text explicit encryption tests#1931
mdb-ad wants to merge 9 commits into
mongodb:masterfrom
mdb-ad:case-tests

Conversation

@mdb-ad
Copy link
Copy Markdown
Contributor

@mdb-ad mdb-ad commented May 5, 2026

Background

Tests case and diacritic insensitivity. Also serves as a regression test for MONGOCRYPT-903. Note: the fix was released in libmongocrypt 1.18.1

Test implementation

Unlike other text prose tests, the new case and diacritic tests use automatic encryption to insert the test document. This is because the libmongocrypt bug reversed case and diacritic sensitivity both on the insert and find, causing the tests to pass.

C driver implementation: mongodb/mongo-c-driver#2289
Evergreen patch (C driver): https://spruce.corp.mongodb.com/version/69fe3b156c09fa0007dd4f45
Libmongocrypt build (for drivers testing): https://spruce.corp.mongodb.com/version/libmongocrypt_d64db0ad9db89b8ba85e6330133e2df55b5eb9ff

@mdb-ad mdb-ad requested a review from kevinAlbs May 5, 2026 18:20
@mdb-ad mdb-ad requested a review from a team as a code owner May 5, 2026 18:20
Comment thread source/client-side-encryption/tests/README.md Outdated
@mdb-ad mdb-ad requested a review from kevinAlbs May 5, 2026 19:45
@mdb-ad mdb-ad requested a review from a team as a code owner May 8, 2026 19:49
Copy link
Copy Markdown
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM with additional notes to skip server 9.0.0+ and require libmongocrypt 1.18.1.

Expect an error from libmongocrypt with a message containing the string: "contention factor is required for textPreview
algorithm".

#### Case 8: can find a case and diacritic-insensitively indexed document by prefix and suffix
Copy link
Copy Markdown
Contributor

@kevinAlbs kevinAlbs May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also note: "Skip this test case if testing MongoDB server 9.0.0+." note (similar to Case 7) to cases 8 and 9 (requiring prefixPreview and suffixPreview).

And note that libmongocrypt 1.18.1 is required for test cases 8 and 9 since those are regression tests for MONGOCRYPT-903.

@kevinAlbs kevinAlbs requested a review from rozza May 8, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants