Skip to content

Commit 538b7ed

Browse files
committed
fix: update tests
Signed-off-by: Devin Buhl <[email protected]>
1 parent 95342b1 commit 538b7ed

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

alerting/provider/pushover/pushover_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ func TestPushoverAlertProvider_IsInvalid(t *testing.T) {
3333
ApplicationToken: "aTokenWithLengthOfMoreThan30characters",
3434
UserKey: "aTokenWithLengthOfMoreThan30characters",
3535
Priority: 5,
36-
ResolvedPriotity: 5,
3736
}
3837
if invalidProvider.IsValid() {
3938
t.Error("provider should've been invalid")
@@ -106,7 +105,6 @@ func TestAlertProvider_Send(t *testing.T) {
106105
},
107106
},
108107
scenario.Resolved,
109-
scenario.ResolvedPriority,
110108
)
111109
if scenario.ExpectedError && err == nil {
112110
t.Error("expected error, got none")
@@ -141,7 +139,7 @@ func TestAlertProvider_buildRequestBody(t *testing.T) {
141139
Provider: AlertProvider{ApplicationToken: "TokenWithLengthOf30Characters2", UserKey: "TokenWithLengthOf30Characters5", Title: "Gatus Notifications", Priority: 2},
142140
Alert: alert.Alert{Description: &secondDescription, SuccessThreshold: 5, FailureThreshold: 3},
143141
Resolved: true,
144-
ExpectedBody: "{\"token\":\"TokenWithLengthOf30Characters2\",\"user\":\"TokenWithLengthOf30Characters5\",\"title\":\"Gatus Notifications\",\"message\":\"RESOLVED: endpoint-name - description-2\",\"priority\":2}",
142+
ExpectedBody: "{\"token\":\"TokenWithLengthOf30Characters2\",\"user\":\"TokenWithLengthOf30Characters5\",\"title\":\"Gatus Notifications\",\"message\":\"RESOLVED: endpoint-name - description-2\",\"priority\":0}",
145143
},
146144
{
147145
Name: "resolved-priority",
@@ -155,7 +153,7 @@ func TestAlertProvider_buildRequestBody(t *testing.T) {
155153
Provider: AlertProvider{ApplicationToken: "TokenWithLengthOf30Characters2", UserKey: "TokenWithLengthOf30Characters5", Title: "Gatus Notifications", Priority: 2, Sound: "falling"},
156154
Alert: alert.Alert{Description: &secondDescription, SuccessThreshold: 5, FailureThreshold: 3},
157155
Resolved: true,
158-
ExpectedBody: "{\"token\":\"TokenWithLengthOf30Characters2\",\"user\":\"TokenWithLengthOf30Characters5\",\"title\":\"Gatus Notifications\",\"message\":\"RESOLVED: endpoint-name - description-2\",\"priority\":2,\"sound\":\"falling\"}",
156+
ExpectedBody: "{\"token\":\"TokenWithLengthOf30Characters2\",\"user\":\"TokenWithLengthOf30Characters5\",\"title\":\"Gatus Notifications\",\"message\":\"RESOLVED: endpoint-name - description-2\",\"priority\":0,\"sound\":\"falling\"}",
159157
},
160158
}
161159
for _, scenario := range scenarios {
@@ -170,7 +168,6 @@ func TestAlertProvider_buildRequestBody(t *testing.T) {
170168
},
171169
},
172170
scenario.Resolved,
173-
scenario.ResolvedPriority,
174171
)
175172
if string(body) != scenario.ExpectedBody {
176173
t.Errorf("expected:\n%s\ngot:\n%s", scenario.ExpectedBody, body)

0 commit comments

Comments
 (0)