Skip to content

Commit e2631ac

Browse files
committed
Update to libmongocrypt 1.5.0 (#1048)
* CDRIVER-4397 resync fle2 tests This accounts for MONGOCRYPT-433 being re-applied. * pin libmongocrypt to 1.5.0 * CDRIVER-4417 update prose tests to set contention factors
1 parent 69a5267 commit e2631ac

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.evergreen/compile-unix.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ pkg-config --modversion libssl || true
230230

231231
if [ "$COMPILE_LIBMONGOCRYPT" = "ON" ]; then
232232
# Build libmongocrypt, using the previously fetched installed source.
233-
# TODO (CDRIVER-4397): add "--branch 1.5.0-rc0" in git clone once libmongocrypt 1.5.0-rc0 is released.
234-
git clone https://github.com/mongodb/libmongocrypt
233+
git clone https://github.com/mongodb/libmongocrypt --branch 1.5.0
234+
235235
mkdir libmongocrypt/cmake-build
236236
cd libmongocrypt/cmake-build
237237
$CMAKE -DENABLE_SHARED_BSON=ON -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" ../

.evergreen/compile-windows.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ fi
115115

116116
if [ "$COMPILE_LIBMONGOCRYPT" = "ON" ]; then
117117
# Build libmongocrypt, using the previously fetched installed source.
118-
# TODO (CDRIVER-4397): add "--branch 1.5.0-rc0" in git clone once libmongocrypt 1.5.0-rc0 is released.
119-
git clone https://github.com/mongodb/libmongocrypt
118+
git clone https://github.com/mongodb/libmongocrypt --branch 1.5.0
120119
mkdir libmongocrypt/cmake-build
121120
cd libmongocrypt/cmake-build
122121
"$CMAKE" -G "$CC" "-DCMAKE_PREFIX_PATH=${INSTALL_DIR}/lib/cmake" -DENABLE_SHARED_BSON=ON -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" ../

src/libmongoc/tests/test-mongoc-client-side-encryption.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3572,6 +3572,7 @@ test_explicit_encryption_case1 (void *unused)
35723572
mongoc_client_encryption_encrypt_opts_set_keyid (eopts, &eef->key1ID);
35733573
mongoc_client_encryption_encrypt_opts_set_algorithm (
35743574
eopts, MONGOC_ENCRYPT_ALGORITHM_INDEXED);
3575+
mongoc_client_encryption_encrypt_opts_set_contention_factor (eopts, 0);
35753576

35763577
ok = mongoc_client_encryption_encrypt (
35773578
eef->clientEncryption, &plaintext, eopts, &insertPayload, &error);
@@ -3607,6 +3608,7 @@ test_explicit_encryption_case1 (void *unused)
36073608
eopts, MONGOC_ENCRYPT_ALGORITHM_INDEXED);
36083609
mongoc_client_encryption_encrypt_opts_set_query_type (
36093610
eopts, MONGOC_ENCRYPT_QUERY_TYPE_EQUALITY);
3611+
mongoc_client_encryption_encrypt_opts_set_contention_factor (eopts, 0);
36103612

36113613
ok = mongoc_client_encryption_encrypt (
36123614
eef->clientEncryption, &plaintext, eopts, &findPayload, &error);
@@ -3677,7 +3679,7 @@ test_explicit_encryption_case2 (void *unused)
36773679
mongoc_client_encryption_encrypt_opts_destroy (eopts);
36783680
}
36793681

3680-
/* Find with default contention factor of 0. Expect < 10 documents returned.
3682+
/* Find with contention factor of 0. Expect < 10 documents returned.
36813683
*/
36823684
{
36833685
bson_value_t findPayload;
@@ -3692,6 +3694,7 @@ test_explicit_encryption_case2 (void *unused)
36923694
eopts, MONGOC_ENCRYPT_ALGORITHM_INDEXED);
36933695
mongoc_client_encryption_encrypt_opts_set_query_type (
36943696
eopts, MONGOC_ENCRYPT_QUERY_TYPE_EQUALITY);
3697+
mongoc_client_encryption_encrypt_opts_set_contention_factor (eopts, 0);
36953698

36963699
ok = mongoc_client_encryption_encrypt (
36973700
eef->clientEncryption, &plaintext, eopts, &findPayload, &error);
@@ -3850,6 +3853,7 @@ test_explicit_encryption_case4 (void *unused)
38503853
mongoc_client_encryption_encrypt_opts_set_keyid (eopts, &eef->key1ID);
38513854
mongoc_client_encryption_encrypt_opts_set_algorithm (
38523855
eopts, MONGOC_ENCRYPT_ALGORITHM_INDEXED);
3856+
mongoc_client_encryption_encrypt_opts_set_contention_factor (eopts, 0);
38533857

38543858
ok = mongoc_client_encryption_encrypt (
38553859
eef->clientEncryption, &plaintext, eopts, &payload, &error);

0 commit comments

Comments
 (0)