Alerting: Use correct response body for silence post API (#57114)
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/api/response"
|
"github.com/grafana/grafana/pkg/api/response"
|
||||||
"github.com/grafana/grafana/pkg/infra/log"
|
"github.com/grafana/grafana/pkg/infra/log"
|
||||||
"github.com/grafana/grafana/pkg/models"
|
"github.com/grafana/grafana/pkg/models"
|
||||||
@@ -85,7 +86,9 @@ func (srv AlertmanagerSrv) RouteCreateSilence(c *models.ReqContext, postableSile
|
|||||||
|
|
||||||
return ErrResp(http.StatusInternalServerError, err, "failed to create silence")
|
return ErrResp(http.StatusInternalServerError, err, "failed to create silence")
|
||||||
}
|
}
|
||||||
return response.JSON(http.StatusAccepted, util.DynMap{"message": "silence created", "id": silenceID})
|
return response.JSON(http.StatusAccepted, apimodels.PostSilencesOKBody{
|
||||||
|
SilenceID: silenceID,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (srv AlertmanagerSrv) RouteDeleteAlertingConfig(c *models.ReqContext) response.Response {
|
func (srv AlertmanagerSrv) RouteDeleteAlertingConfig(c *models.ReqContext) response.Response {
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ func (am *LotexAM) RouteCreateSilence(ctx *models.ReqContext, silenceBody apimod
|
|||||||
"silences",
|
"silences",
|
||||||
nil,
|
nil,
|
||||||
bytes.NewBuffer(blob),
|
bytes.NewBuffer(blob),
|
||||||
jsonExtractor(&apimodels.GettableSilence{}),
|
jsonExtractor(&apimodels.PostSilencesOKBody{}),
|
||||||
map[string]string{"Content-Type": "application/json"},
|
map[string]string{"Content-Type": "application/json"},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -413,6 +413,9 @@
|
|||||||
"auth_password": {
|
"auth_password": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
|
"auth_password_file": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"auth_secret": {
|
"auth_secret": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
@@ -1161,6 +1164,9 @@
|
|||||||
"smtp_auth_password": {
|
"smtp_auth_password": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
|
"smtp_auth_password_file": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"smtp_auth_secret": {
|
"smtp_auth_secret": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
@@ -3035,6 +3041,9 @@
|
|||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
|
"location": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"months": {
|
"months": {
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -3269,7 +3278,6 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"alertGroup": {
|
"alertGroup": {
|
||||||
"description": "AlertGroup alert group",
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"alerts": {
|
"alerts": {
|
||||||
"description": "alerts",
|
"description": "alerts",
|
||||||
@@ -3293,7 +3301,6 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"alertGroups": {
|
"alertGroups": {
|
||||||
"description": "AlertGroups alert groups",
|
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/alertGroup"
|
"$ref": "#/definitions/alertGroup"
|
||||||
},
|
},
|
||||||
@@ -3454,7 +3461,6 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"gettableAlerts": {
|
"gettableAlerts": {
|
||||||
"description": "GettableAlerts gettable alerts",
|
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/gettableAlert"
|
"$ref": "#/definitions/gettableAlert"
|
||||||
},
|
},
|
||||||
@@ -3510,13 +3516,13 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"gettableSilences": {
|
"gettableSilences": {
|
||||||
"description": "GettableSilences gettable silences",
|
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/gettableSilence"
|
"$ref": "#/definitions/gettableSilence"
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
"integration": {
|
"integration": {
|
||||||
|
"description": "Integration integration",
|
||||||
"properties": {
|
"properties": {
|
||||||
"lastNotifyAttempt": {
|
"lastNotifyAttempt": {
|
||||||
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
|
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
|
||||||
@@ -3613,6 +3619,15 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"postSilencesOKBody": {
|
||||||
|
"properties": {
|
||||||
|
"silenceID": {
|
||||||
|
"description": "silence ID",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"postableAlert": {
|
"postableAlert": {
|
||||||
"description": "PostableAlert postable alert",
|
"description": "PostableAlert postable alert",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ import (
|
|||||||
// create silence
|
// create silence
|
||||||
//
|
//
|
||||||
// Responses:
|
// Responses:
|
||||||
// 201: gettableSilence
|
// 201: postSilencesOKBody
|
||||||
// 400: ValidationError
|
// 400: ValidationError
|
||||||
|
|
||||||
// swagger:route POST /api/alertmanager/{DatasourceUID}/api/v2/silences alertmanager RouteCreateSilence
|
// swagger:route POST /api/alertmanager/{DatasourceUID}/api/v2/silences alertmanager RouteCreateSilence
|
||||||
@@ -207,7 +207,7 @@ import (
|
|||||||
// create silence
|
// create silence
|
||||||
//
|
//
|
||||||
// Responses:
|
// Responses:
|
||||||
// 201: gettableSilence
|
// 201: postSilencesOKBody
|
||||||
// 400: ValidationError
|
// 400: ValidationError
|
||||||
// 404: NotFound
|
// 404: NotFound
|
||||||
|
|
||||||
@@ -389,6 +389,12 @@ func NewGettableStatus(cfg *PostableApiAlertingConfig) *GettableStatus {
|
|||||||
// swagger:model postableSilence
|
// swagger:model postableSilence
|
||||||
type PostableSilence = amv2.PostableSilence
|
type PostableSilence = amv2.PostableSilence
|
||||||
|
|
||||||
|
// swagger:model postSilencesOKBody
|
||||||
|
type PostSilencesOKBody struct { // vendored from "github.com/prometheus/alertmanager/api/v2/restapi/operations/silence/PostSilencesOKBody" because import brings too many other things
|
||||||
|
// silence ID
|
||||||
|
SilenceID string `json:"silenceID,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// swagger:model gettableSilences
|
// swagger:model gettableSilences
|
||||||
type GettableSilences = amv2.GettableSilences
|
type GettableSilences = amv2.GettableSilences
|
||||||
|
|
||||||
|
|||||||
@@ -413,6 +413,9 @@
|
|||||||
"auth_password": {
|
"auth_password": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
|
"auth_password_file": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"auth_secret": {
|
"auth_secret": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
@@ -1161,6 +1164,9 @@
|
|||||||
"smtp_auth_password": {
|
"smtp_auth_password": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
|
"smtp_auth_password_file": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"smtp_auth_secret": {
|
"smtp_auth_secret": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
@@ -3035,6 +3041,9 @@
|
|||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
|
"location": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"months": {
|
"months": {
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -3078,7 +3087,6 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"URL": {
|
"URL": {
|
||||||
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"ForceQuery": {
|
"ForceQuery": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
@@ -3114,7 +3122,7 @@
|
|||||||
"$ref": "#/definitions/Userinfo"
|
"$ref": "#/definitions/Userinfo"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"title": "A URL represents a parsed URL (technically, a URI reference).",
|
"title": "URL is a custom URL type that allows validation at configuration load time.",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"Userinfo": {
|
"Userinfo": {
|
||||||
@@ -3293,6 +3301,7 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"alertGroups": {
|
"alertGroups": {
|
||||||
|
"description": "AlertGroups alert groups",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/alertGroup"
|
"$ref": "#/definitions/alertGroup"
|
||||||
},
|
},
|
||||||
@@ -3397,6 +3406,7 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"gettableAlert": {
|
"gettableAlert": {
|
||||||
|
"description": "GettableAlert gettable alert",
|
||||||
"properties": {
|
"properties": {
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"$ref": "#/definitions/labelSet"
|
"$ref": "#/definitions/labelSet"
|
||||||
@@ -3452,7 +3462,6 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"gettableAlerts": {
|
"gettableAlerts": {
|
||||||
"description": "GettableAlerts gettable alerts",
|
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/gettableAlert"
|
"$ref": "#/definitions/gettableAlert"
|
||||||
},
|
},
|
||||||
@@ -3507,6 +3516,7 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"gettableSilences": {
|
"gettableSilences": {
|
||||||
|
"description": "GettableSilences gettable silences",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/gettableSilence"
|
"$ref": "#/definitions/gettableSilence"
|
||||||
},
|
},
|
||||||
@@ -3610,6 +3620,15 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"postSilencesOKBody": {
|
||||||
|
"properties": {
|
||||||
|
"silenceID": {
|
||||||
|
"description": "silence ID",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"postableAlert": {
|
"postableAlert": {
|
||||||
"description": "PostableAlert postable alert",
|
"description": "PostableAlert postable alert",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -3685,7 +3704,6 @@
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"receiver": {
|
"receiver": {
|
||||||
"description": "Receiver receiver",
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"active": {
|
"active": {
|
||||||
"description": "active",
|
"description": "active",
|
||||||
@@ -4066,9 +4084,9 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
"description": "gettableSilence",
|
"description": "postSilencesOKBody",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/gettableSilence"
|
"$ref": "#/definitions/postSilencesOKBody"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
@@ -4602,9 +4620,9 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
"description": "gettableSilence",
|
"description": "postSilencesOKBody",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/gettableSilence"
|
"$ref": "#/definitions/postSilencesOKBody"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|||||||
@@ -281,9 +281,9 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
"description": "gettableSilence",
|
"description": "postSilencesOKBody",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/gettableSilence"
|
"$ref": "#/definitions/postSilencesOKBody"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
@@ -817,9 +817,9 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
"description": "gettableSilence",
|
"description": "postSilencesOKBody",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/gettableSilence"
|
"$ref": "#/definitions/postSilencesOKBody"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
@@ -2951,6 +2951,9 @@
|
|||||||
"auth_password": {
|
"auth_password": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
|
"auth_password_file": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"auth_secret": {
|
"auth_secret": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
@@ -3700,6 +3703,9 @@
|
|||||||
"smtp_auth_password": {
|
"smtp_auth_password": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
|
"smtp_auth_password_file": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"smtp_auth_secret": {
|
"smtp_auth_secret": {
|
||||||
"$ref": "#/definitions/Secret"
|
"$ref": "#/definitions/Secret"
|
||||||
},
|
},
|
||||||
@@ -5575,6 +5581,9 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"location": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"months": {
|
"months": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@@ -5617,9 +5626,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"URL": {
|
"URL": {
|
||||||
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"title": "A URL represents a parsed URL (technically, a URI reference).",
|
"title": "URL is a custom URL type that allows validation at configuration load time.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"ForceQuery": {
|
"ForceQuery": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
@@ -5833,6 +5841,7 @@
|
|||||||
"$ref": "#/definitions/alertGroup"
|
"$ref": "#/definitions/alertGroup"
|
||||||
},
|
},
|
||||||
"alertGroups": {
|
"alertGroups": {
|
||||||
|
"description": "AlertGroups alert groups",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/alertGroup"
|
"$ref": "#/definitions/alertGroup"
|
||||||
@@ -5938,6 +5947,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gettableAlert": {
|
"gettableAlert": {
|
||||||
|
"description": "GettableAlert gettable alert",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"labels",
|
"labels",
|
||||||
@@ -5994,7 +6004,6 @@
|
|||||||
"$ref": "#/definitions/gettableAlert"
|
"$ref": "#/definitions/gettableAlert"
|
||||||
},
|
},
|
||||||
"gettableAlerts": {
|
"gettableAlerts": {
|
||||||
"description": "GettableAlerts gettable alerts",
|
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/gettableAlert"
|
"$ref": "#/definitions/gettableAlert"
|
||||||
@@ -6051,6 +6060,7 @@
|
|||||||
"$ref": "#/definitions/gettableSilence"
|
"$ref": "#/definitions/gettableSilence"
|
||||||
},
|
},
|
||||||
"gettableSilences": {
|
"gettableSilences": {
|
||||||
|
"description": "GettableSilences gettable silences",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/gettableSilence"
|
"$ref": "#/definitions/gettableSilence"
|
||||||
@@ -6156,6 +6166,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"postSilencesOKBody": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"silenceID": {
|
||||||
|
"description": "silence ID",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"postableAlert": {
|
"postableAlert": {
|
||||||
"description": "PostableAlert postable alert",
|
"description": "PostableAlert postable alert",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -6232,7 +6251,6 @@
|
|||||||
"$ref": "#/definitions/postableSilence"
|
"$ref": "#/definitions/postableSilence"
|
||||||
},
|
},
|
||||||
"receiver": {
|
"receiver": {
|
||||||
"description": "Receiver receiver",
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"active",
|
"active",
|
||||||
|
|||||||
@@ -239,13 +239,11 @@ func TestAMConfigAccess(t *testing.T) {
|
|||||||
desc: "editor request should succeed",
|
desc: "editor request should succeed",
|
||||||
url: "http://editor:editor@%s/api/alertmanager/grafana/api/v2/silences",
|
url: "http://editor:editor@%s/api/alertmanager/grafana/api/v2/silences",
|
||||||
expStatus: http.StatusAccepted,
|
expStatus: http.StatusAccepted,
|
||||||
expBody: `{"id":"0","message":"silence created"}`,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
desc: "admin request should succeed",
|
desc: "admin request should succeed",
|
||||||
url: "http://admin:admin@%s/api/alertmanager/grafana/api/v2/silences",
|
url: "http://admin:admin@%s/api/alertmanager/grafana/api/v2/silences",
|
||||||
expStatus: http.StatusAccepted,
|
expStatus: http.StatusAccepted,
|
||||||
expBody: `{"id":"0","message":"silence created"}`,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,8 +261,10 @@ func TestAMConfigAccess(t *testing.T) {
|
|||||||
b, err := io.ReadAll(resp.Body)
|
b, err := io.ReadAll(resp.Body)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
if tc.expStatus == http.StatusAccepted {
|
if tc.expStatus == http.StatusAccepted {
|
||||||
re := regexp.MustCompile(`"id":"([\w|-]+)"`)
|
response := apimodels.PostSilencesOKBody{}
|
||||||
b = re.ReplaceAll(b, []byte(`"id":"0"`))
|
require.NoError(t, json.Unmarshal(b, &response))
|
||||||
|
require.NotEmpty(t, response.SilenceID)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
require.Contains(t, string(b), tc.expBody)
|
require.Contains(t, string(b), tc.expBody)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user