-
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.
Opsgenie Plugin support schedules/teams ID and Name (#44381)
* Opsgenie Plugin support schedules/teams ID and Name Signed-off-by: Edward Dowling <[email protected]> * Replace regex by UUID parser Signed-off-by: Edward Dowling <[email protected]> --------- Signed-off-by: Edward Dowling <[email protected]> Co-authored-by: Carlos Castro <[email protected]>
- Loading branch information
1 parent
e6ff706
commit bc6e4c4
Showing
2 changed files
with
23 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,8 +59,8 @@ func TestCreateAlert(t *testing.T) { | |
Roles: []string{"role1", "role2"}, | ||
RequestReason: "someReason", | ||
SystemAnnotations: types.Labels{ | ||
types.TeleportNamespace + types.ReqAnnotationNotifySchedulesLabel: {"[email protected]"}, | ||
types.TeleportNamespace + types.ReqAnnotationTeamsLabel: {"MyOpsGenieTeam"}, | ||
types.TeleportNamespace + types.ReqAnnotationNotifySchedulesLabel: {"[email protected]", "bb4d9938-c3c2-455d-aaab-727aa701c0d8"}, | ||
types.TeleportNamespace + types.ReqAnnotationTeamsLabel: {"MyOpsGenieTeam", "aee8a0de-c80f-4515-a232-501c0bc9d715"}, | ||
}, | ||
}) | ||
assert.NoError(t, err) | ||
|
@@ -70,8 +70,10 @@ func TestCreateAlert(t *testing.T) { | |
Alias: "teleport-access-request/someRequestID", | ||
Description: "someUser requested permissions for roles role1, role2 on Teleport at 01 Jan 01 00:00 UTC.\nReason: someReason\n\n", | ||
Responders: []Responder{ | ||
{Type: "schedule", Name: "[email protected]", ID: "[email protected]"}, | ||
{Type: "team", Name: "MyOpsGenieTeam", ID: "MyOpsGenieTeam"}, | ||
{Type: "schedule", Name: "[email protected]"}, | ||
{Type: "schedule", ID: "bb4d9938-c3c2-455d-aaab-727aa701c0d8"}, | ||
{Type: "team", Name: "MyOpsGenieTeam"}, | ||
{Type: "team", ID: "aee8a0de-c80f-4515-a232-501c0bc9d715"}, | ||
}, | ||
Priority: "somePriority", | ||
} | ||
|