Package misk. aws. dynamodb. testing
Types
Link copied to clipboard
class DockerDynamoDbModule(tables: List<DynamoDbTable>) : KAbstractModule
Content copied to clipboard
Spins up a docker container for testing. It clears the table content before each test starts.
Link copied to clipboard
data class DynamoDbTable(tableClass: KClass<*>, configureTable: (CreateTableRequest) -> CreateTableRequest)
Content copied to clipboard
Use this with DockerDynamoDbModule or InProcessDynamoDbModule to configure your DynamoDB tables for each test execution.
Link copied to clipboard
class InProcessDynamoDbModule(tables: List<DynamoDbTable>) : KAbstractModule
Content copied to clipboard
Executes a DynamoDB service in-process per test. It clears the table content before each test starts.
Link copied to clipboard
class TestDynamoDb @Inject constructor(service: TestDynamoDbService) : Service
Content copied to clipboard
Thin wrapper to make TestDynamoDbService, which is not a @Singleton, compatible with ServiceModule.