Skip to content

Commit

Permalink
fix: add force object to automation config replicaset object (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilar committed Dec 10, 2021
1 parent 59a9f9d commit 714a503
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions opsmngr/automation_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ type ReplicaSet struct {
Members []Member `json:"members"`
Settings *map[string]interface{} `json:"settings,omitempty"`
WriteConcernMajorityJournalDefault string `json:"writeConcernMajorityJournalDefault,omitempty"`
Force *Force `json:"force,omitempty"`
}

type Force struct {
CurrentVersion int `json:"currentVersion"`
}

// TLS defines TLS parameters for Net.
Expand Down
6 changes: 5 additions & 1 deletion opsmngr/automation_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ const jsonBlob = `{
"votes" : 1
} ],
"protocolVersion" : "1",
"settings" : { }
"settings" : { },
"force": {
"currentVersion": -1
}
} ],
"version" : 1
}`
Expand Down Expand Up @@ -360,6 +363,7 @@ func TestAutomation_GetConfig(t *testing.T) {
},
},
Settings: &map[string]interface{}{},
Force: &Force{CurrentVersion: -1},
},
},
Version: 1,
Expand Down

0 comments on commit 714a503

Please sign in to comment.