Skip to content

Commit

Permalink
Add an automated test to assert that a hidden replica set member is r…
Browse files Browse the repository at this point in the history
…ecognized as type RSOther
  • Loading branch information
jyemin committed Oct 2, 2015
1 parent d283b8c commit 15810be
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,46 @@
"outcome": {
"servers": {
"a:27017": {
"setName": null,
"type": "Unknown"
"setName": "rs",
"type": "RSOther"
},
"b:27017": {
"setName": "rs",
"type": "RSOther"
},
"c:27017": {
"setName": null,
"type": "Unknown"
},
"d:27017": {
"setName": null,
"type": "Unknown"
}
},
"setName": "rs",
"topologyType": "ReplicaSetNoPrimary"
},
"responses": [
[
"a:27017",
{
"hidden": true,
"hosts": [
"c:27017",
"d:27017"
],
"ismaster": false,
"ok": 1,
"secondary": true,
"setName": "rs"
}
],
[
"b:27017",
{
"hosts": [
"a:27017",
"b:27017"
"c:27017",
"d:27017"
],
"ismaster": false,
"ok": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ phases: [
{
responses: [

["a:27017", {

ok: 1,
ismaster: false,
secondary: true,
hidden: true,
hosts: ["c:27017", "d:27017"],
setName: "rs"
}],
["b:27017", {

ok: 1,
ismaster: false,
secondary: false,
hosts: ["a:27017", "b:27017"],
hosts: ["c:27017", "d:27017"],
setName: "rs"
}]
],
Expand All @@ -23,14 +32,26 @@ phases: [

"a:27017": {

type: "Unknown",
setName:
type: "RSOther",
setName: "rs"
},

"b:27017": {

type: "RSOther",
setName: "rs"
},

"c:27017": {

type: "Unknown",
setName:
},

"d:27017": {

type: "Unknown",
setName:
}
},

Expand Down

0 comments on commit 15810be

Please sign in to comment.