forked from TrueCloudLab/frostfs-node
[#312] control: Add health status field to health check response body
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0abb8acef3
commit
6ae51e41f9
4 changed files with 92 additions and 51 deletions
|
@ -22,12 +22,14 @@ func TestHealthCheckResponse_Body_StableMarshal(t *testing.T) {
|
|||
func generateHealthCheckResponseBody() *control.HealthCheckResponse_Body {
|
||||
body := new(control.HealthCheckResponse_Body)
|
||||
body.SetNetmapStatus(control.NetmapStatus_ONLINE)
|
||||
body.SetHealthStatus(control.HealthStatus_SHUTTING_DOWN)
|
||||
|
||||
return body
|
||||
}
|
||||
|
||||
func equalHealthCheckResponseBodies(b1, b2 *control.HealthCheckResponse_Body) bool {
|
||||
return b1.GetNetmapStatus() == b2.GetNetmapStatus()
|
||||
return b1.GetNetmapStatus() == b2.GetNetmapStatus() &&
|
||||
b1.GetHealthStatus() == b2.GetHealthStatus()
|
||||
}
|
||||
|
||||
func TestNetmapSnapshotResponse_Body_StableMarshal(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue