mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove context.TODO() from services (#42555)
* Remove context.TODO() from services * Fix live test
This commit is contained in:
@@ -72,7 +72,7 @@ func TestWhenAlertManagerShouldNotify(t *testing.T) {
|
||||
|
||||
evalContext.Rule.State = tc.newState
|
||||
|
||||
res := am.ShouldNotify(context.TODO(), evalContext, &models.AlertNotificationState{})
|
||||
res := am.ShouldNotify(context.Background(), evalContext, &models.AlertNotificationState{})
|
||||
if res != tc.expect {
|
||||
t.Errorf("got %v expected %v", res, tc.expect)
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ func TestSendSlackRequest(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
slackNotifier := not.(*SlackNotifier)
|
||||
|
||||
err = slackNotifier.sendRequest(context.TODO(), []byte("test"))
|
||||
err = slackNotifier.sendRequest(context.Background(), []byte("test"))
|
||||
if !test.expectError {
|
||||
require.NoError(tt, err)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user