-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix opsgenie plugin to use correct annotation to determine whether or…
… not to create alerts (#38435) * Fix bug in opsgenie plugin mixing up notify-services and schedules * Update docs for opsgenie plugin to use correct schedules * Remove accidental change to opsgenie client * Update opsgenie client tests * Update opsgneie plugin behaviour for determining recipients * Update docs with correct screenshot of role creation * Stop Opsgenie plugin sending alerts when /schedules label is set * Change rawRecipients initialisation in opsgenie bot * Remove opsgenie add role example image from docs * Update integrations/access/accessrequest/app.go Co-authored-by: Roman Tkachenko <[email protected]> * Update docs/pages/access-controls/access-request-plugins/opsgenie.mdx Co-authored-by: Roman Tkachenko <[email protected]> * Make variable Opsgenie plugin var names more consistent * Update changelog with opsgenie breaking changes * Rename ReqAnnotationSchedulesLabel for consistency * Fix opsgenie getOnCall * Add opsgenie approval tests + add approval user configuration * Appease linter * Add back in opsgenie client fix * Appease linter * Add in clarifying comment for alert request retry behaviour * Add missing opsgenie endpoint mocks --------- Co-authored-by: Roman Tkachenko <[email protected]> Co-authored-by: Hugo Hervieux <[email protected]>
- Loading branch information
1 parent
4b4fa81
commit 0b01cf5
Showing
16 changed files
with
372 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,9 @@ import ( | |
func TestCreateAlert(t *testing.T) { | ||
recievedReq := "" | ||
testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { | ||
if req.URL.Path != "/v2/alerts" { | ||
return | ||
} | ||
bodyBytes, err := io.ReadAll(req.Body) | ||
if err != nil { | ||
log.Fatal(err) | ||
|
@@ -56,7 +59,7 @@ func TestCreateAlert(t *testing.T) { | |
Roles: []string{"role1", "role2"}, | ||
RequestReason: "someReason", | ||
SystemAnnotations: types.Labels{ | ||
types.TeleportNamespace + types.ReqAnnotationSchedulesLabel: {"[email protected]"}, | ||
types.TeleportNamespace + types.ReqAnnotationNotifySchedulesLabel: {"[email protected]"}, | ||
}, | ||
}) | ||
assert.NoError(t, err) | ||
|
Oops, something went wrong.