...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/unified/find-allowdiskuse.json

Documentation: go.mongodb.org/mongo-driver/testdata/crud/unified

     1{
     2  "description": "find-allowdiskuse",
     3  "schemaVersion": "1.0",
     4  "runOnRequirements": [
     5    {
     6      "minServerVersion": "4.3.1"
     7    }
     8  ],
     9  "createEntities": [
    10    {
    11      "client": {
    12        "id": "client0",
    13        "observeEvents": [
    14          "commandStartedEvent"
    15        ]
    16      }
    17    },
    18    {
    19      "database": {
    20        "id": "database0",
    21        "client": "client0",
    22        "databaseName": "crud-v2"
    23      }
    24    },
    25    {
    26      "collection": {
    27        "id": "collection0",
    28        "database": "database0",
    29        "collectionName": "test_find_allowdiskuse"
    30      }
    31    }
    32  ],
    33  "tests": [
    34    {
    35      "description": "Find does not send allowDiskUse when value is not specified",
    36      "operations": [
    37        {
    38          "object": "collection0",
    39          "name": "find",
    40          "arguments": {
    41            "filter": {}
    42          }
    43        }
    44      ],
    45      "expectEvents": [
    46        {
    47          "client": "client0",
    48          "events": [
    49            {
    50              "commandStartedEvent": {
    51                "command": {
    52                  "find": "test_find_allowdiskuse",
    53                  "allowDiskUse": {
    54                    "$$exists": false
    55                  }
    56                }
    57              }
    58            }
    59          ]
    60        }
    61      ]
    62    },
    63    {
    64      "description": "Find sends allowDiskUse false when false is specified",
    65      "operations": [
    66        {
    67          "object": "collection0",
    68          "name": "find",
    69          "arguments": {
    70            "filter": {},
    71            "allowDiskUse": false
    72          }
    73        }
    74      ],
    75      "expectEvents": [
    76        {
    77          "client": "client0",
    78          "events": [
    79            {
    80              "commandStartedEvent": {
    81                "command": {
    82                  "find": "test_find_allowdiskuse",
    83                  "allowDiskUse": false
    84                }
    85              }
    86            }
    87          ]
    88        }
    89      ]
    90    },
    91    {
    92      "description": "Find sends allowDiskUse true when true is specified",
    93      "operations": [
    94        {
    95          "object": "collection0",
    96          "name": "find",
    97          "arguments": {
    98            "filter": {},
    99            "allowDiskUse": true
   100          }
   101        }
   102      ],
   103      "expectEvents": [
   104        {
   105          "client": "client0",
   106          "events": [
   107            {
   108              "commandStartedEvent": {
   109                "command": {
   110                  "find": "test_find_allowdiskuse",
   111                  "allowDiskUse": true
   112                }
   113              }
   114            }
   115          ]
   116        }
   117      ]
   118    }
   119  ]
   120}

View as plain text