mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
test: Improvements
This commit is contained in:
parent
e65fb8547d
commit
3f0fe5986c
@ -41,6 +41,10 @@ describe('AWS - Schedule Integration Test', function() {
|
||||
|
||||
return confirmCloudWatchLogs(`/aws/lambda/${stackName}-${functionName}`, async () => {}, {
|
||||
timeout: 3 * 60 * 1000,
|
||||
checkIsComplete: soFarEvents => {
|
||||
const logs = soFarEvents.reduce((data, event) => data + event.message, '');
|
||||
return logs.includes('transformedInput');
|
||||
},
|
||||
}).then(events => {
|
||||
const logs = events.reduce((data, event) => data + event.message, '');
|
||||
expect(logs).to.include(functionName);
|
||||
|
||||
@ -47,8 +47,15 @@ describe('AWS - SNS Integration Test', function() {
|
||||
const functionName = 'snsMinimal';
|
||||
const message = 'Hello from SNS!';
|
||||
|
||||
return confirmCloudWatchLogs(`/aws/lambda/${stackName}-${functionName}`, () =>
|
||||
publishSnsMessage(minimalTopicName, message)
|
||||
return confirmCloudWatchLogs(
|
||||
`/aws/lambda/${stackName}-${functionName}`,
|
||||
() => publishSnsMessage(minimalTopicName, message),
|
||||
{
|
||||
checkIsComplete: soFarEvents => {
|
||||
const logs = soFarEvents.reduce((data, event) => data + event.message, '');
|
||||
return logs.includes(message);
|
||||
},
|
||||
}
|
||||
).then(events => {
|
||||
const logs = events.reduce((data, event) => data + event.message, '');
|
||||
expect(logs).to.include(functionName);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user