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 1c190d4bda
commit ecb2005dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 18 deletions

View File

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