Fix sys/health tests (#3762)

* Fix sys/health tests

* Fix sys/health tests

* Fix sys/health tests
This commit is contained in:
Calvin Leung Huang
2018-01-08 15:03:36 -05:00
committed by GitHub
parent 78adac0a24
commit 202a7aec2c

View File

@@ -23,9 +23,10 @@ func TestSysHealth_get(t *testing.T) {
var actual map[string]interface{} var actual map[string]interface{}
expected := map[string]interface{}{ expected := map[string]interface{}{
"initialized": false, "replication_dr_secondary": false,
"sealed": true, "initialized": false,
"standby": true, "sealed": true,
"standby": true,
} }
testResponseStatus(t, resp, 501) testResponseStatus(t, resp, 501)
testResponseBody(t, resp, &actual) testResponseBody(t, resp, &actual)
@@ -53,9 +54,10 @@ func TestSysHealth_get(t *testing.T) {
actual = map[string]interface{}{} actual = map[string]interface{}{}
expected = map[string]interface{}{ expected = map[string]interface{}{
"initialized": true, "replication_dr_secondary": false,
"sealed": true, "initialized": true,
"standby": true, "sealed": true,
"standby": true,
} }
testResponseStatus(t, resp, 503) testResponseStatus(t, resp, 503)
testResponseBody(t, resp, &actual) testResponseBody(t, resp, &actual)
@@ -87,9 +89,10 @@ func TestSysHealth_get(t *testing.T) {
actual = map[string]interface{}{} actual = map[string]interface{}{}
expected = map[string]interface{}{ expected = map[string]interface{}{
"initialized": true, "replication_dr_secondary": false,
"sealed": false, "initialized": true,
"standby": false, "sealed": false,
"standby": false,
} }
testResponseStatus(t, resp, 200) testResponseStatus(t, resp, 200)
testResponseBody(t, resp, &actual) testResponseBody(t, resp, &actual)
@@ -127,9 +130,10 @@ func TestSysHealth_customcodes(t *testing.T) {
var actual map[string]interface{} var actual map[string]interface{}
expected := map[string]interface{}{ expected := map[string]interface{}{
"initialized": false, "replication_dr_secondary": false,
"sealed": true, "initialized": false,
"standby": true, "sealed": true,
"standby": true,
} }
testResponseStatus(t, resp, 581) testResponseStatus(t, resp, 581)
testResponseBody(t, resp, &actual) testResponseBody(t, resp, &actual)
@@ -158,9 +162,10 @@ func TestSysHealth_customcodes(t *testing.T) {
actual = map[string]interface{}{} actual = map[string]interface{}{}
expected = map[string]interface{}{ expected = map[string]interface{}{
"initialized": true, "replication_dr_secondary": false,
"sealed": true, "initialized": true,
"standby": true, "sealed": true,
"standby": true,
} }
testResponseStatus(t, resp, 523) testResponseStatus(t, resp, 523)
testResponseBody(t, resp, &actual) testResponseBody(t, resp, &actual)
@@ -193,9 +198,10 @@ func TestSysHealth_customcodes(t *testing.T) {
actual = map[string]interface{}{} actual = map[string]interface{}{}
expected = map[string]interface{}{ expected = map[string]interface{}{
"initialized": true, "replication_dr_secondary": false,
"sealed": false, "initialized": true,
"standby": false, "sealed": false,
"standby": false,
} }
testResponseStatus(t, resp, 202) testResponseStatus(t, resp, 202)
testResponseBody(t, resp, &actual) testResponseBody(t, resp, &actual)