-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
good-first-issueGood for newcomersGood for newcomers
Description
Why is this needed?
Currently, some unit tests such as powertools-idempotency-dynamodb
depend on running a local server for mocking AWS resources.
This violates the principle that unit tests should run in a self-contained way.
Example which should be avoided:
Lines 50 to 55 in 7b18029
dynamoProxy = ServerRunner.createServerFromCommandLineArgs(new String[] { | |
"-inMemory", | |
"-port", | |
Integer.toString(port) | |
}); | |
dynamoProxy.start(); |
This starts a DynamoDB mock server on localhost.
Which area does this relate to?
Tests
Suggestion
This issues suggests to:
- Audit all unit tests for external dependencies
- Replace external dependencies by self-contained mocking
- Add a test scenario in the end2end tests to cover the use-case using real infrastructure in real AWS accounts
Acknowledgment
- This request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, TypeScript, and .NET
Metadata
Metadata
Assignees
Labels
good-first-issueGood for newcomersGood for newcomers
Type
Projects
Status
Backlog