...

Text file src/go.mongodb.org/mongo-driver/testdata/read-write-concern/operation/default-write-concern-3.2.json

Documentation: go.mongodb.org/mongo-driver/testdata/read-write-concern/operation

     1{
     2  "data": [
     3    {
     4      "_id": 1,
     5      "x": 11
     6    },
     7    {
     8      "_id": 2,
     9      "x": 22
    10    }
    11  ],
    12  "collection_name": "default_write_concern_coll",
    13  "database_name": "default_write_concern_db",
    14  "runOn": [
    15    {
    16      "minServerVersion": "3.2"
    17    }
    18  ],
    19  "tests": [
    20    {
    21      "description": "findAndModify operations omit default write concern",
    22      "operations": [
    23        {
    24          "name": "findOneAndUpdate",
    25          "object": "collection",
    26          "collectionOptions": {
    27            "writeConcern": {}
    28          },
    29          "arguments": {
    30            "filter": {
    31              "_id": 1
    32            },
    33            "update": {
    34              "$set": {
    35                "x": 1
    36              }
    37            }
    38          }
    39        },
    40        {
    41          "name": "findOneAndReplace",
    42          "object": "collection",
    43          "collectionOptions": {
    44            "writeConcern": {}
    45          },
    46          "arguments": {
    47            "filter": {
    48              "_id": 2
    49            },
    50            "replacement": {
    51              "x": 2
    52            }
    53          }
    54        },
    55        {
    56          "name": "findOneAndDelete",
    57          "object": "collection",
    58          "collectionOptions": {
    59            "writeConcern": {}
    60          },
    61          "arguments": {
    62            "filter": {
    63              "_id": 2
    64            }
    65          }
    66        }
    67      ],
    68      "outcome": {
    69        "collection": {
    70          "name": "default_write_concern_coll",
    71          "data": [
    72            {
    73              "_id": 1,
    74              "x": 1
    75            }
    76          ]
    77        }
    78      },
    79      "expectations": [
    80        {
    81          "command_started_event": {
    82            "command": {
    83              "findAndModify": "default_write_concern_coll",
    84              "query": {
    85                "_id": 1
    86              },
    87              "update": {
    88                "$set": {
    89                  "x": 1
    90                }
    91              },
    92              "writeConcern": null
    93            }
    94          }
    95        },
    96        {
    97          "command_started_event": {
    98            "command": {
    99              "findAndModify": "default_write_concern_coll",
   100              "query": {
   101                "_id": 2
   102              },
   103              "update": {
   104                "x": 2
   105              },
   106              "writeConcern": null
   107            }
   108          }
   109        },
   110        {
   111          "command_started_event": {
   112            "command": {
   113              "findAndModify": "default_write_concern_coll",
   114              "query": {
   115                "_id": 2
   116              },
   117              "remove": true,
   118              "writeConcern": null
   119            }
   120          }
   121        }
   122      ]
   123    }
   124  ]
   125}

View as plain text