Skip to content

Commit f30b232

Browse files
committed
format
1 parent 6b560e1 commit f30b232

File tree

1 file changed

+45
-35
lines changed

1 file changed

+45
-35
lines changed

source/client-side-encryption/tests/README.md

Lines changed: 45 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3767,8 +3767,8 @@ Assert that an error is thrown.
37673767

37683768
### 27. Text Explicit Encryption
37693769

3770-
The Text Explicit Encryption tests utilize Queryable Encryption (QE) range protocol V2 and require MongoDB server
3771-
8.2.0+ and libmongocrypt 1.15.0+. The tests must not run against a standalone.
3770+
The Text Explicit Encryption tests utilize Queryable Encryption (QE) range protocol V2 and require MongoDB server 8.2.0+
3771+
and libmongocrypt 1.15.0+. The tests must not run against a standalone.
37723772

37733773
Before running each of the following test cases, perform the following Test Setup.
37743774

@@ -3811,8 +3811,8 @@ class AutoEncryptionOpts {
38113811
}
38123812
```
38133813

3814-
The remaining tasks require setting `TextOpts`. [Test Setup: TextOpts](#test-setup-textopts) lists the values to use
3815-
for `TextOpts` for each of the supported data types.
3814+
The remaining tasks require setting `TextOpts`. [Test Setup: TextOpts](#test-setup-textopts) lists the values to use for
3815+
`TextOpts` for each of the supported data types.
38163816

38173817
#### Test Setup: TextOpts
38183818

@@ -3834,31 +3834,31 @@ class EncryptOpts {
38343834

38353835
1. Prefix
38363836

3837-
```typescript
3838-
class PrefixOpts {
3839-
strMaxQueryLength: 10,
3840-
strMinQueryLength: 2,
3841-
}
3842-
```
3837+
```typescript
3838+
class PrefixOpts {
3839+
strMaxQueryLength: 10,
3840+
strMinQueryLength: 2,
3841+
}
3842+
```
38433843

38443844
2. Suffix
38453845

3846-
```typescript
3847-
class SuffixOpts {
3848-
strMaxQueryLength: 10,
3849-
strMinQueryLength: 2,
3850-
}
3851-
```
3846+
```typescript
3847+
class SuffixOpts {
3848+
strMaxQueryLength: 10,
3849+
strMinQueryLength: 2,
3850+
}
3851+
```
38523852

38533853
3. Substring
38543854

3855-
```typescript
3856-
class SubstringOpts {
3857-
strMaxLength: 10,
3858-
strMaxQueryLength: 10,
3859-
strMinQueryLength: 2,
3860-
}
3861-
```
3855+
```typescript
3856+
class SubstringOpts {
3857+
strMaxLength: 10,
3858+
strMaxQueryLength: 10,
3859+
strMinQueryLength: 2,
3860+
}
3861+
```
38623862

38633863
Use `clientEncryption` to encrypt the string `"foobarbaz"`.
38643864

@@ -3889,10 +3889,13 @@ Use `encryptedClient` to insert the following document into `db.explicit_encrypt
38893889
Use `clientEncryption.encrypt()` to encrypt the string `"foo"`:
38903890

38913891
Store this query in `findPayload`.
3892+
38923893
```javascript
38933894
{ "$expr": { "$encStrStartsWith": {"input": "encryptedText", "prefix": <encrypted "foo">}, } }
38943895
```
3895-
Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption` collection with the filter `findPayload`.
3896+
3897+
Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption` collection with the filter
3898+
`findPayload`.
38963899

38973900
Assert the following document is returned:
38983901

@@ -3905,12 +3908,13 @@ Assert the following document is returned:
39053908
Use `clientEncryption.encrypt()` to encrypt the string `"baz"`:
39063909

39073910
Store this query in `findPayload`.
3911+
39083912
```javascript
39093913
{ "$expr": { "$encStrStartsWith": {"input": "encryptedText", "prefix": <encrypted "baz">}, } }
39103914
```
39113915

3912-
Store the result in `findPayload`.
3913-
Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption` collection with the filter `findPayload`.
3916+
Store the result in `findPayload`. Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption`
3917+
collection with the filter `findPayload`.
39143918

39153919
Assert the following document is returned:
39163920

@@ -3923,12 +3927,13 @@ Assert the following document is returned:
39233927
Use `clientEncryption.encrypt()` to encrypt the string `"baz"`:
39243928

39253929
Store this query in `findPayload`.
3930+
39263931
```javascript
39273932
{ "$expr": { "$encStrStartsWith": {"input": "encryptedText", "prefix": <encrypted "baz">}, } }
39283933
```
39293934

3930-
Store the result in `findPayload`.
3931-
Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption` collection with the filter `findPayload`.
3935+
Store the result in `findPayload`. Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption`
3936+
collection with the filter `findPayload`.
39323937

39333938
Assert that no documents are returned.
39343939

@@ -3937,16 +3942,18 @@ Assert that no documents are returned.
39373942
Use `clientEncryption.encrypt()` to encrypt the string `"foo"`:
39383943

39393944
Store this query in `findPayload`.
3945+
39403946
```javascript
39413947
{ "$expr": { "$encStrStartsWith": {"input": "encryptedText", "suffix": <encrypted "foo">}, } }
39423948
```
39433949

3944-
Store the result in `findPayload`.
3945-
Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption` collection with the filter `findPayload`.
3950+
Store the result in `findPayload`. Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption`
3951+
collection with the filter `findPayload`.
39463952

39473953
Assert that no documents are returned.
39483954

39493955
#### Substring test setup
3956+
39503957
Load the file `encryptedFields-substring.json` as `encryptedFields`.
39513958

39523959
Load the file
@@ -3979,15 +3986,17 @@ Use `encryptedClient` to insert the following document into `db.explicit_encrypt
39793986
```
39803987

39813988
#### Case 5: can find a document by substring
3989+
39823990
Use `clientEncryption.encrypt()` to encrypt the string `"bar"`:
39833991

39843992
Store this query in `findPayload`.
3993+
39853994
```javascript
39863995
{ "$expr": { "$encStrStartsWith": {"input": "encryptedText", "prefix": <encrypted "bar">}, } }
39873996
```
39883997

3989-
Store the result in `findPayload`.
3990-
Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption` collection with the filter `findPayload`.
3998+
Store the result in `findPayload`. Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption`
3999+
collection with the filter `findPayload`.
39914000

39924001
Assert the following document is returned:
39934002

@@ -4000,11 +4009,12 @@ Assert the following document is returned:
40004009
Use `clientEncryption.encrypt()` to encrypt the string `"qux"`:
40014010

40024011
Store this query in `findPayload`.
4012+
40034013
```javascript
40044014
{ "$expr": { "$encStrStartsWith": {"input": "encryptedText", "prefix": <encrypted "qux">}, } }
40054015
```
40064016

4007-
Store the result in `findPayload`.
4008-
Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption` collection with the filter `findPayload`.
4017+
Store the result in `findPayload`. Use `encryptedClient` to run a "find" operation on the `db.explicit_encryption`
4018+
collection with the filter `findPayload`.
40094019

4010-
Assert that no documents are returned.
4020+
Assert that no documents are returned.

0 commit comments

Comments
 (0)