Fixes #3077: Empty "issues" attribute of Monitoring / HealthCheck result causes errors in Zabbix.
This commit is contained in:
parent
c4f4deabde
commit
6bf588dd0c
2 changed files with 2 additions and 0 deletions
|
@ -168,6 +168,7 @@ curl http://localhost/api/v1/monitoring/health_check?token=XXX
|
||||||
result = {
|
result = {
|
||||||
healthy: true,
|
healthy: true,
|
||||||
message: 'success',
|
message: 'success',
|
||||||
|
issues: issues,
|
||||||
token: token,
|
token: token,
|
||||||
}
|
}
|
||||||
render json: result
|
render json: result
|
||||||
|
|
|
@ -128,6 +128,7 @@ RSpec.describe 'Monitoring', type: :request do
|
||||||
|
|
||||||
expect(json_response).to be_a_kind_of(Hash)
|
expect(json_response).to be_a_kind_of(Hash)
|
||||||
expect(json_response['error']).to be_falsey
|
expect(json_response['error']).to be_falsey
|
||||||
|
expect(json_response['issues']).to eq([])
|
||||||
expect(json_response['healthy']).to eq(true)
|
expect(json_response['healthy']).to eq(true)
|
||||||
expect(json_response['message']).to eq('success')
|
expect(json_response['message']).to eq('success')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue