-
Notifications
You must be signed in to change notification settings - Fork 109
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
[examples] add an example project to show test strategies #438
Conversation
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.
Some queries around testing infrastructure
/// This interface is not part of the public API and must not be used by adopters. | ||
/// It is declared public to allow users to unit test their handler. | ||
/// This API is not part of semver versioning. | ||
public static func __forTestsOnly( |
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.
Why are we making this public if it can be visible with @testable
?
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.
If we want it public, we might want to consider introducing a LambdaTesting
target to keep it separate
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.
You're correct, I was importing @testable import AWSLambdaRuntime
but I needed AWSLambdaRuntimeCore
This is fixed now, this PR only touches files in the Examples
directory. Thank you !
61dda3a
to
17cc50c
Compare
Note that the integration tests fail pending merging of #441 |
821f2dd
to
3cb188d
Compare
This new example project show four testing strategies for Swift Lambda function
[IMPORTANT]
To allow testing the handler, I had to change visibility of a method in the Runtime project. This method is clearly marked for testing only, so it should not be a problem. Happy to read feedback and discuss however.