Skip to content

Commit

Permalink
fixed recovery test in pagerduty
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Dec 1, 2020
1 parent 74bbfdd commit 4588e3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { ResolvedActionGroup } from '../../../../alerts/common';
import { RecoveredActionGroup } from '../../../../alerts/common';
import { AlertProvidedActionVariables } from './action_variables';
import { getDefaultsForActionParams } from './get_defaults_for_action_params';

Expand All @@ -16,8 +16,8 @@ describe('getDefaultsForActionParams', () => {
});
});

test('pagerduty defaults for resolved action group', async () => {
expect(getDefaultsForActionParams('.pagerduty', ResolvedActionGroup.id)).toEqual({
test('pagerduty defaults for recovered action group', async () => {
expect(getDefaultsForActionParams('.pagerduty', RecoveredActionGroup.id)).toEqual({
dedupKey: `{{${AlertProvidedActionVariables.alertId}}}:{{${AlertProvidedActionVariables.alertInstanceId}}}`,
eventAction: 'resolve',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { AlertActionParam, ResolvedActionGroup } from '../../../../alerts/common';
import { AlertActionParam, RecoveredActionGroup } from '../../../../alerts/common';
import { AlertProvidedActionVariables } from './action_variables';

export const getDefaultsForActionParams = (
Expand All @@ -17,7 +17,7 @@ export const getDefaultsForActionParams = (
dedupKey: `{{${AlertProvidedActionVariables.alertId}}}:{{${AlertProvidedActionVariables.alertInstanceId}}}`,
eventAction: 'trigger',
};
if (actionGroupId === ResolvedActionGroup.id) {
if (actionGroupId === RecoveredActionGroup.id) {
pagerDutyDefaults.eventAction = 'resolve';
}
return pagerDutyDefaults;
Expand Down

0 comments on commit 4588e3d

Please sign in to comment.