Skip to content

Commit e498e95

Browse files
committed
fix: fixing alarm topic usage
Fixing test to the correct use of the alarm topic
1 parent 371f1a4 commit e498e95

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/index.test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,15 +1652,15 @@ describe('#index', () => {
16521652
'FooSuccessRateDropAlarm'
16531653
],
16541654
alarmsActions: [
1655-
'AwsAlertsPagingTopic'
1655+
'AwsAlertsAlarm'
16561656
]
16571657
},
16581658
},
16591659
alarms: [
16601660
'successRateDrop'
16611661
],
16621662
topics: {
1663-
paging: {
1663+
alarm: {
16641664
topic: 'api-paging-alarm-topic-test',
16651665
notifications:[
16661666
{
@@ -1698,14 +1698,14 @@ describe('#index', () => {
16981698
Foo1SuccessRateDropAlarm: {
16991699
Type: 'AWS::CloudWatch::Alarm',
17001700
},
1701-
AwsAlertsPagingTopic: {
1701+
AwsAlertsAlarm: {
17021702
Type: 'AWS::SNS::Topic',
17031703
},
17041704
AlertsCompositeCompositeSuccessAlarm: {
17051705
Type: 'AWS::CloudWatch::CompositeAlarm',
17061706
Properties: expect.objectContaining({
17071707
AlarmRule: 'ALARM(fooservice-dev-foo-successRateDrop)',
1708-
AlarmActions: [{ Ref: 'AwsAlertsPagingTopic' }],
1708+
AlarmActions: [{ Ref: 'AwsAlertsAlarm' }],
17091709
}),
17101710
},
17111711
});
@@ -1738,14 +1738,14 @@ describe('#index', () => {
17381738
Foo1SuccessRateDropAlarm: {
17391739
Type: 'AWS::CloudWatch::Alarm',
17401740
},
1741-
AwsAlertsPagingTopic: {
1741+
AwsAlertsAlarm: {
17421742
Type: 'AWS::SNS::Topic',
17431743
},
17441744
AlertsCompositeCompositeSuccessAlarm: {
17451745
Type: 'AWS::CloudWatch::CompositeAlarm',
17461746
Properties: expect.objectContaining({
17471747
AlarmRule: 'ALARM(fooservice-dev-foo-successRateDrop) OR ALARM(fooservice-dev-foo1-successRateDrop)',
1748-
AlarmActions: [{ Ref: 'AwsAlertsPagingTopic' }],
1748+
AlarmActions: [{ Ref: 'AwsAlertsAlarm' }],
17491749
}),
17501750
},
17511751
});
@@ -1778,7 +1778,7 @@ describe('#index', () => {
17781778
Foo1SuccessRateDropAlarm: {
17791779
Type: 'AWS::CloudWatch::Alarm',
17801780
},
1781-
AwsAlertsPagingTopic: {
1781+
AwsAlertsAlarm: {
17821782
Type: 'AWS::SNS::Topic',
17831783
},
17841784
});
@@ -1805,7 +1805,7 @@ describe('#index', () => {
18051805
plugin.serverless.service.provider.compiledCloudFormationTemplate
18061806
.Resources
18071807
).toMatchObject({
1808-
AwsAlertsPagingTopic: {
1808+
AwsAlertsAlarm: {
18091809
Type: 'AWS::SNS::Topic',
18101810
},
18111811
});

0 commit comments

Comments
 (0)