Skip to content

Commit 5f3d410

Browse files
Include empty case in client metadata tests
1 parent eb7f9a2 commit 5f3d410

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

source/mongodb-handshake/tests/README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Test 1: Test that environment metadata is properly captured
66

7-
Drivers that capture values for `client.env` should test that a connection and hello command succeeds in the presence of
7+
Drivers that capture values for `client.env` should test that a connection and hello command succeed in the presence of
88
the following sets of environment variables:
99

1010
1. Valid AWS
@@ -76,7 +76,7 @@ the following sets of environment variables:
7676

7777
### Test 2: Test that the driver accepts an arbitrary auth mechanism
7878

79-
1. Mock the server response in a way that `saslSupportedMechs` array in the `hello` command response contains an
79+
1. Mock the server response in a way that the `saslSupportedMechs` array in the `hello` command response contains an
8080
arbitrary string.
8181

8282
2. Create and connect a `Connection` object that connects to the server that returns the mocked response.
@@ -93,8 +93,8 @@ test-only backdoor mechanism to intercept the handshake `hello` command for veri
9393
Drivers should verify that metadata provided after `MongoClient` initialization is appended, not replaced, and is
9494
visible in the `hello` command of new connections.
9595

96-
There are multiple test cases parameterized with `DriverInfoOptions` to be appended after `MongoClient` initialization.
97-
Before each test case, perform the setup.
96+
There are multiple test cases with `DriverInfoOptions` parameters to be appended after `MongoClient` initialization.
97+
Before each test case, perform the following setup.
9898

9999
#### Setup
100100

@@ -124,6 +124,7 @@ Before each test case, perform the setup.
124124
| 2 | framework | 2.0 | null |
125125
| 3 | framework | null | Framework Platform |
126126
| 4 | framework | null | null |
127+
| 5 | null | null | null |
127128

128129
#### Running a test case
129130

@@ -148,15 +149,15 @@ Before each test case, perform the setup.
148149

149150
- All other subfields in the `client` document remain unchanged from `initialClientMetadata`.
150151

151-
## Test 2: Multiple Successive Metadata Updates
152+
### Test 2: Multiple Successive Metadata Updates
152153

153154
Drivers should verify that after `MongoClient` initialization, metadata can be updated multiple times, not replaced, and
154155
is visible in the `hello` command of new connections.
155156

156-
There are multiple test cases parameterized with `DriverInfoOptions` to be appended after a previous metadata update.
157-
Before each test case, perform the setup.
157+
There are multiple test cases with `DriverInfoOptions` parameter to be appended after a previous metadata update. Before
158+
each test case, perform the following setup.
158159

159-
### Setup
160+
#### Setup
160161

161162
1. Create a `MongoClient` instance with:
162163

@@ -184,6 +185,7 @@ Before each test case, perform the setup.
184185
| 2 | framework | 2.0 | null |
185186
| 3 | framework | null | Framework Platform |
186187
| 4 | framework | null | null |
188+
| 5 | null | null | null |
187189

188190
#### Running a test case
189191

0 commit comments

Comments
 (0)