...

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

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

     1tests:
     2    -
     3        description: "Default"
     4        uri: "mongodb://localhost/"
     5        valid: true
     6        warning: false
     7        writeConcern: { }
     8    -
     9        description: "w as a valid number"
    10        uri: "mongodb://localhost/?w=1"
    11        valid: true
    12        warning: false
    13        writeConcern: { w: 1 }
    14    -
    15        description: "w as an invalid number"
    16        uri: "mongodb://localhost/?w=-2"
    17        valid: false
    18        warning: ~
    19    -
    20        description: "w as a string"
    21        uri: "mongodb://localhost/?w=majority"
    22        valid: true
    23        warning: false
    24        writeConcern: { w: "majority" }
    25    -
    26        description: "wtimeoutMS as a valid number"
    27        uri: "mongodb://localhost/?wtimeoutMS=500"
    28        valid: true
    29        warning: false
    30        writeConcern: { wtimeoutMS: 500 }
    31    -
    32        description: "wtimeoutMS as an invalid number"
    33        uri: "mongodb://localhost/?wtimeoutMS=-500"
    34        valid: false
    35        warning: ~
    36    -
    37        description: "journal as false"
    38        uri: "mongodb://localhost/?journal=false"
    39        valid: true
    40        warning: false
    41        writeConcern: { journal: false }
    42    -
    43        description: "journal as true"
    44        uri: "mongodb://localhost/?journal=true"
    45        valid: true
    46        warning: false
    47        writeConcern: { journal: true }
    48    -
    49        description: "All options combined"
    50        uri: "mongodb://localhost/?w=3&wtimeoutMS=500&journal=true"
    51        valid: true
    52        warning: false
    53        writeConcern: { w: 3, wtimeoutMS: 500, journal: true }
    54    -
    55        description: "Unacknowledged with w"
    56        uri: "mongodb://localhost/?w=0"
    57        valid: true
    58        warning: false
    59        writeConcern: { w: 0 }
    60    -
    61        description: "Unacknowledged with w and journal"
    62        uri: "mongodb://localhost/?w=0&journal=false"
    63        valid: true
    64        warning: false
    65        writeConcern: { w: 0, journal: false }
    66    -
    67        description: "Unacknowledged with w and wtimeoutMS"
    68        uri: "mongodb://localhost/?w=0&wtimeoutMS=500"
    69        valid: true
    70        warning: false
    71        writeConcern: { w: 0, wtimeoutMS: 500 }
    72    -
    73        description: "Acknowledged with w as 0 and journal true"
    74        uri: "mongodb://localhost/?w=0&journal=true"
    75        valid: false
    76        warning: false
    77        writeConcern: { w: 0, journal: true }

View as plain text