-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move lambda tests into a folder #142
Move lambda tests into a folder #142
Conversation
return { | ||
CloudWatchLogs: jest.fn().mockImplementation((_) => { | ||
return { | ||
describeLogGroups: (params: DescribeLogGroupsRequest, callback?: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
promise: jest.fn().mockImplementation(() => Promise.resolve([])), | ||
}; | ||
}, | ||
putSubscriptionFilter: (params: PutSubscriptionFilterRequest, callback?: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -129,7 +92,7 @@ function mockInputEvent( | |||
} as InputEvent; | |||
} | |||
|
|||
function mockGovCloudInputEvent(params: any, mappings: any, logGroups?: LogGroupDefinition[]) { | |||
export function mockGovCloudInputEvent(params: any, mappings: any, logGroups?: LogGroupDefinition[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
putSubscriptionFilter: (params: PutSubscriptionFilterRequest, callback?: any) => { | ||
return { promise: () => Promise.resolve() }; | ||
}, | ||
createLogGroup: (params: CreateLogGroupRequest, callback?: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
promise: jest.fn().mockImplementation(() => Promise.resolve(response)), | ||
}; | ||
}, | ||
describeSubscriptionFilters: (params: DescribeSubscriptionFiltersRequest, callback?: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c9fcce4
to
c1df317
Compare
/merge |
Devflow running:
|
Context of this PR series
Right now the Datadog Serverless CloudFormation Macro only supports instrumenting Lambda functions. This series of PRs makes it also support instrumenting Step Functions.
Instead of merging every PR into main branch, I'm going to merge them into a feature branch
yiming.luo/step-function
to:What does this PR do?
Move tests node for Lambda to a
lambda
folder. Later I will create astep_function
folder, so Lambda and Step Function code and tests will be separate and more clear.Motivation
Testing Guidelines
Run
npm test
to run existing tests. They still pass.Additional Notes
Types of changes
Check all that apply