Skip to content

Commit

Permalink
tests: use a known test phone for SNS v3 tests (#3632)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-luna authored Sep 26, 2023
1 parent 3a26c89 commit c888b4c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

const TEST_IGNORE_TOPIC = 'topic-to-ignore';
const TEST_IGNORE_TARGET = 'target-to-ignore';
const TEST_IGNORE_PHONE = '6666666';
const TEST_IGNORE_PHONE = '0101';

const apm = require('../../../../..').start({
serviceName: 'use-client-sns',
Expand Down Expand Up @@ -110,7 +110,7 @@ async function useClientSNS(snsClient, topicName) {
// https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sns/command/PublishCommand/
command = new PublishCommand({
Message: 'message to be sent',
PhoneNumber: '+34555555555',
PhoneNumber: '+15555550100',
});
data = await snsClient.send(command);
assert(
Expand Down Expand Up @@ -177,7 +177,7 @@ async function useClientSNS(snsClient, topicName) {

command = new PublishCommand({
Message: 'message to be sent',
PhoneNumber: `+34${TEST_IGNORE_PHONE}`,
PhoneNumber: `+1555555${TEST_IGNORE_PHONE}`,
});
data = await snsClient.send(command);
assert(
Expand All @@ -190,7 +190,7 @@ async function useClientSNS(snsClient, topicName) {
Message: 'message to be sent',
TopicArn: topicArn,
TargetArn: topicArn,
PhoneNumber: `+345555555`,
PhoneNumber: '+15555550100',
});
data = await snsClient.send(command);
assert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import assert from 'assert';
async function useClientSNS(snsClient) {
const command = new PublishCommand({
Message: 'message to be sent',
PhoneNumber: '+34555555555',
PhoneNumber: '+15555550100',
});
const data = await snsClient.send(command);
assert(
Expand Down
8 changes: 4 additions & 4 deletions test/instrumentation/modules/aws-sdk/sns.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ tape.test('AWS SNS: Unit Test Functions', function (test) {
params: {
Message:
'this is my test, there are many like it but this one is mine',
PhoneNumber: '1-555-555-5555',
PhoneNumber: '+15555550100',
},
}),
'1-555-555-5555',
'+15555550100',
);

t.end();
Expand Down Expand Up @@ -170,7 +170,7 @@ tape.test('AWS SNS: Unit Test Functions', function (test) {
params: {
Message: 'work test',
Subject: 'Admin',
PhoneNumber: '15037299028',
PhoneNumber: '+15555550100',
},
}),
'<PHONE_NUMBER>',
Expand All @@ -189,7 +189,7 @@ tape.test('AWS SNS: Unit Test Functions', function (test) {
params: {
Message: 'work test',
Subject: 'Admin',
PhoneNumber: '15555555555',
PhoneNumber: '+15555550100',
},
}),
'SNS PUBLISH to <PHONE_NUMBER>',
Expand Down

0 comments on commit c888b4c

Please sign in to comment.