...

Text file src/go.mongodb.org/mongo-driver/testdata/server-discovery-and-monitoring/rs/secondary_ignore_ok_0.yml

Documentation: go.mongodb.org/mongo-driver/testdata/server-discovery-and-monitoring/rs

     1description: "New primary"
     2
     3uri: "mongodb://a,b/?replicaSet=rs"
     4
     5phases: [
     6
     7    {
     8        responses: [
     9
    10                ["a:27017", {
    11
    12                    ok: 1,
    13                    helloOk: true,
    14                    isWritablePrimary: true,
    15                    setName: "rs",
    16                    hosts: ["a:27017", "b:27017"],
    17                    minWireVersion: 0,
    18                    maxWireVersion: 6
    19                }],
    20                ["b:27017", {
    21
    22                    ok: 1,
    23                    helloOk: true,
    24                    isWritablePrimary: false,
    25                    secondary: true,
    26                    setName: "rs",
    27                    hosts: ["a:27017", "b:27017"],
    28                    minWireVersion: 0,
    29                    maxWireVersion: 6
    30                }]
    31        ],
    32
    33        outcome: {
    34
    35            servers: {
    36
    37                "a:27017": {
    38
    39                    type: "RSPrimary",
    40                    setName: "rs"
    41                },
    42
    43                "b:27017": {
    44
    45                    type: "RSSecondary",
    46                    setName: "rs"
    47                }
    48            },
    49            topologyType: "ReplicaSetWithPrimary",
    50            logicalSessionTimeoutMinutes: null,
    51            setName: "rs"
    52        }
    53    },
    54
    55    {
    56        responses: [
    57
    58                ["b:27017", {
    59
    60                    ok: 0,
    61                    minWireVersion: 0,
    62                    maxWireVersion: 6
    63                }]
    64        ],
    65
    66        outcome: {
    67
    68            servers: {
    69                "a:27017": {
    70
    71                    type: "RSPrimary",
    72                    setName: "rs"
    73                },
    74
    75                "b:27017": {
    76
    77                    type: "Unknown",
    78                    setName:
    79                }
    80
    81            },
    82            topologyType: "ReplicaSetWithPrimary",
    83            logicalSessionTimeoutMinutes: null,
    84            setName: "rs"
    85        }
    86    }
    87]

View as plain text