...

Text file src/go.mongodb.org/mongo-driver/testdata/read-write-concern/connection-string/write-concern.json

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

     1{
     2  "tests": [
     3    {
     4      "description": "Default",
     5      "uri": "mongodb://localhost/",
     6      "valid": true,
     7      "warning": false,
     8      "writeConcern": {}
     9    },
    10    {
    11      "description": "w as a valid number",
    12      "uri": "mongodb://localhost/?w=1",
    13      "valid": true,
    14      "warning": false,
    15      "writeConcern": {
    16        "w": 1
    17      }
    18    },
    19    {
    20      "description": "w as an invalid number",
    21      "uri": "mongodb://localhost/?w=-2",
    22      "valid": false,
    23      "warning": null
    24    },
    25    {
    26      "description": "w as a string",
    27      "uri": "mongodb://localhost/?w=majority",
    28      "valid": true,
    29      "warning": false,
    30      "writeConcern": {
    31        "w": "majority"
    32      }
    33    },
    34    {
    35      "description": "wtimeoutMS as a valid number",
    36      "uri": "mongodb://localhost/?wtimeoutMS=500",
    37      "valid": true,
    38      "warning": false,
    39      "writeConcern": {
    40        "wtimeoutMS": 500
    41      }
    42    },
    43    {
    44      "description": "wtimeoutMS as an invalid number",
    45      "uri": "mongodb://localhost/?wtimeoutMS=-500",
    46      "valid": false,
    47      "warning": null
    48    },
    49    {
    50      "description": "journal as false",
    51      "uri": "mongodb://localhost/?journal=false",
    52      "valid": true,
    53      "warning": false,
    54      "writeConcern": {
    55        "journal": false
    56      }
    57    },
    58    {
    59      "description": "journal as true",
    60      "uri": "mongodb://localhost/?journal=true",
    61      "valid": true,
    62      "warning": false,
    63      "writeConcern": {
    64        "journal": true
    65      }
    66    },
    67    {
    68      "description": "All options combined",
    69      "uri": "mongodb://localhost/?w=3&wtimeoutMS=500&journal=true",
    70      "valid": true,
    71      "warning": false,
    72      "writeConcern": {
    73        "w": 3,
    74        "wtimeoutMS": 500,
    75        "journal": true
    76      }
    77    },
    78    {
    79      "description": "Unacknowledged with w",
    80      "uri": "mongodb://localhost/?w=0",
    81      "valid": true,
    82      "warning": false,
    83      "writeConcern": {
    84        "w": 0
    85      }
    86    },
    87    {
    88      "description": "Unacknowledged with w and journal",
    89      "uri": "mongodb://localhost/?w=0&journal=false",
    90      "valid": true,
    91      "warning": false,
    92      "writeConcern": {
    93        "w": 0,
    94        "journal": false
    95      }
    96    },
    97    {
    98      "description": "Unacknowledged with w and wtimeoutMS",
    99      "uri": "mongodb://localhost/?w=0&wtimeoutMS=500",
   100      "valid": true,
   101      "warning": false,
   102      "writeConcern": {
   103        "w": 0,
   104        "wtimeoutMS": 500
   105      }
   106    },
   107    {
   108      "description": "Acknowledged with w as 0 and journal true",
   109      "uri": "mongodb://localhost/?w=0&journal=true",
   110      "valid": false,
   111      "warning": false,
   112      "writeConcern": {
   113        "w": 0,
   114        "journal": true
   115      }
   116    }
   117  ]
   118}

View as plain text