NTP-16585 | updated UT (#465)
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"houston/common/util"
|
||||
"houston/contracts"
|
||||
"houston/logger"
|
||||
"houston/mocks"
|
||||
@@ -42,8 +41,9 @@ func (suite *EEMonitoringServiceSuite) Test_TriggerWebhook_ErrorResponseCase() {
|
||||
|
||||
payload, _ := json.Marshal(getRequestBody())
|
||||
requestHeaders := map[string]string{
|
||||
"Content-Type": util.ContentTypeJSON,
|
||||
"CORRELATION_ID": requestId,
|
||||
"Content-Type": "application/json",
|
||||
"X-Correlation-Id": requestId,
|
||||
"correlationId": requestId,
|
||||
}
|
||||
|
||||
restClient.PostWithTimeoutMock.When(fullURL, *bytes.NewBuffer(payload), requestHeaders, defaultTimeOut,
|
||||
@@ -71,8 +71,9 @@ func (suite *EEMonitoringServiceSuite) Test_TriggerWebhook_SuccessCase() {
|
||||
|
||||
payload, _ := json.Marshal(getRequestBody())
|
||||
requestHeaders := map[string]string{
|
||||
"Content-Type": util.ContentTypeJSON,
|
||||
"CORRELATION_ID": requestId,
|
||||
"Content-Type": "application/json",
|
||||
"X-Correlation-Id": requestId,
|
||||
"correlationId": requestId,
|
||||
}
|
||||
response := &http.Response{
|
||||
StatusCode: 200,
|
||||
@@ -111,7 +112,7 @@ func getRequestBody() *contracts.SeverityUpdateWebhookRequest {
|
||||
}
|
||||
|
||||
func getCurrentSeverity() contracts.SeverityInfo {
|
||||
return contracts.SeverityInfo{Name: "Sev-0", ID: 2}
|
||||
return contracts.SeverityInfo{Name: "Sev-0", ID: 1}
|
||||
}
|
||||
|
||||
func TestEEMonitoringServiceClient(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user