Fixes #3077: Empty "issues" attribute of Monitoring / HealthCheck result causes errors in Zabbix.

This commit is contained in:
Thorsten Eckel 2020-07-10 16:43:39 +02:00
parent c4f4deabde
commit 6bf588dd0c
2 changed files with 2 additions and 0 deletions

View file

@ -168,6 +168,7 @@ curl http://localhost/api/v1/monitoring/health_check?token=XXX
result = {
healthy: true,
message: 'success',
issues: issues,
token: token,
}
render json: result

View file

@ -128,6 +128,7 @@ RSpec.describe 'Monitoring', type: :request do
expect(json_response).to be_a_kind_of(Hash)
expect(json_response['error']).to be_falsey
expect(json_response['issues']).to eq([])
expect(json_response['healthy']).to eq(true)
expect(json_response['message']).to eq('success')