Skip to content

Commit e59a0ac

Browse files
authored
DRIVERS-2619 Remove null values from command_started_event in fle2v2-CreateCollection.yml (#1429)
* remove null values from `command_started_event` * link to legacy command monitoring spec tests runner * note `null` is only expected in top level fields of command
1 parent 9e770b5 commit e59a0ac

File tree

3 files changed

+6
-28
lines changed

3 files changed

+6
-28
lines changed

source/client-side-encryption/tests/legacy/fle2v2-CreateCollection.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,6 @@
158158
"command": {
159159
"create": "encryptedCollection",
160160
"encryptedFields": {
161-
"escCollection": null,
162-
"ecocCollection": null,
163-
"eccCollection": null,
164161
"fields": [
165162
{
166163
"path": "firstName",
@@ -343,9 +340,6 @@
343340
"command": {
344341
"create": "encryptedCollection",
345342
"encryptedFields": {
346-
"escCollection": null,
347-
"ecocCollection": null,
348-
"eccCollection": null,
349343
"fields": [
350344
{
351345
"path": "firstName",
@@ -851,9 +845,6 @@
851845
"command": {
852846
"create": "encryptedCollection",
853847
"encryptedFields": {
854-
"escCollection": null,
855-
"ecocCollection": null,
856-
"eccCollection": null,
857848
"fields": [
858849
{
859850
"path": "firstName",
@@ -1048,9 +1039,6 @@
10481039
"command": {
10491040
"create": "encryptedCollection",
10501041
"encryptedFields": {
1051-
"escCollection": null,
1052-
"ecocCollection": null,
1053-
"eccCollection": null,
10541042
"fields": [
10551043
{
10561044
"path": "firstName",
@@ -1367,9 +1355,6 @@
13671355
"command": {
13681356
"create": "encryptedCollection",
13691357
"encryptedFields": {
1370-
"escCollection": null,
1371-
"ecocCollection": null,
1372-
"eccCollection": null,
13731358
"fields": [
13741359
{
13751360
"path": "firstName",
@@ -1635,9 +1620,6 @@
16351620
"command": {
16361621
"create": "encryptedCollection",
16371622
"encryptedFields": {
1638-
"escCollection": null,
1639-
"ecocCollection": null,
1640-
"eccCollection": null,
16411623
"fields": [
16421624
{
16431625
"path": "firstName",

source/client-side-encryption/tests/legacy/fle2v2-CreateCollection.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ tests:
101101
command:
102102
create: *encrypted_collection_name
103103
encryptedFields: &encrypted_fields_expectation {
104-
# Expect state collections are not included in the encryptedFields sent to the server.
105-
"escCollection": null,
106-
"ecocCollection": null,
107-
"eccCollection": null,
108104
"fields": [
109105
{
110106
"path": "firstName",
@@ -939,4 +935,4 @@ tests:
939935
collection: *encrypted_collection_name
940936
result:
941937
# Expect error due to server constraints added in SERVER-74069
942-
errorContains: "Encrypted State Collection name should follow"
938+
errorContains: "Encrypted State Collection name should follow"

source/transactions/tests/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Then for each element in ``tests``:
322322
#. Call ``session0.endSession()`` and ``session1.endSession``.
323323
#. If the test includes a list of command-started events in ``expectations``,
324324
compare them to the actual command-started events using the
325-
same logic as the Command Monitoring Spec Tests runner, plus the rules in
325+
same logic as the `legacy Command Monitoring Spec Tests runner <https://github.com/mongodb/specifications/blob/09ee1ebc481f1502e3246971a9419e484d736207/source/command-monitoring/tests/README.rst#expectations>`_, plus the rules in
326326
the Command-Started Events instructions below.
327327
#. If ``failPoint`` is specified, disable the fail point to avoid spurious
328328
failures in subsequent tests. The fail point may be disabled like so::
@@ -507,10 +507,10 @@ value "session0" or "session1". Tests MUST assert that the command's actual
507507
Null Values
508508
~~~~~~~~~~~
509509

510-
Some command-started events in ``expectations`` include ``null`` values for
511-
fields such as ``txnNumber``, ``autocommit``, and ``writeConcern``.
512-
Tests MUST assert that the actual command **omits** any field that has a
513-
``null`` value in the expected command.
510+
Some command-started events in ``expectations`` include ``null`` values for top
511+
level ```command``` fields such as ``txnNumber``, ``autocommit``, and
512+
``writeConcern``. Tests MUST assert that the actual command **omits** any field
513+
that has a ``null`` value in the expected command.
514514

515515
Cursor Id
516516
~~~~~~~~~

0 commit comments

Comments
 (0)