Merge pull request #48 from Limess/get-check-severity
Unmarshal check severity_level
This commit is contained in:
Коммит
7fc01671cb
|
@ -33,6 +33,7 @@ type CheckResponse struct {
|
|||
LastResponseTime int64 `json:"lastresponsetime,omitempty"`
|
||||
Paused bool `json:"paused,omitempty"`
|
||||
IntegrationIds []int `json:"integrationids,omitempty"`
|
||||
SeverityLevel string `json:"severity_level,omitempty"`
|
||||
Type CheckResponseType `json:"type,omitempty"`
|
||||
Tags []CheckResponseTag `json:"tags,omitempty"`
|
||||
UserIds []int `json:"userids,omitempty"`
|
||||
|
|
|
@ -28,6 +28,7 @@ var detailedCheckJSON = `
|
|||
},
|
||||
"hostname" : "s7.mydomain.com",
|
||||
"status" : "up",
|
||||
"severity_level": "HIGH",
|
||||
"lasterrortime" : 1293143467,
|
||||
"lasttesttime" : 1294064823,
|
||||
"tags": [],
|
||||
|
@ -48,4 +49,5 @@ func TestCheckResponseUnmarshal(t *testing.T) {
|
|||
assert.Equal(t, "http", ck.Type.Name)
|
||||
assert.NotNil(t, ck.Type.HTTP)
|
||||
assert.Equal(t, 2, len(ck.Type.HTTP.RequestHeaders))
|
||||
assert.Equal(t, "HIGH", ck.SeverityLevel)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче