Open orlangure opened 4 years ago
Hi, Can I work on this issue?
Hi, @imsk17! Of course. Thank you! If you need any help getting started, I'm here to help.
it seems this isn't easy. dynamodb requires structs before it makes a table. so u cannot use map[string]interface{}
@imsk17, that's fine! I think we should go for quick wins, and having a working preset that creates a dynamodb container, even without initial data, would be great.
What do you think about narrowing the scope of this issue to implementing a preset that only has a working healthcheck function?
If in the future somebody requests initial setup, we handle it then.
or maybe we can setup a withStructs() method?
I think it would complicate the development too much for the value it provides. If you'd like to work on initial data setup in dynamodb, I'd recommend to work on it as an independent task right after we merge a minimal working preset.
okay! thats fine
@imsk17 Are you still working on this?
quite busy nowadays. you can do it if you want to
@orlangure
Why not to use DynamoDB from localstack
and you decided to create a separate preset?
@nawa, I think using the official docker image would be as close to the real thing as possible, probably closer than Localstack implementation.
Another factor is the API. Take Localstack S3 for example. We have WithS3Files
option, which would be useless if you only need Localstack container to test SQS. Eventually the number of Localstack options could grow too much and add too much noise, so I'd rather "move" these options into separate, dedicated presets wherever possible.
The third factor which I'm not entirely sure about is startup speed. I assume that starting Localstack would take more time than just a DynamoDB container.
But I'm of course glad that there is an option to use DynamoDB via Localstack even though there are no initial state setup features like with other databases.
A short guide on implementing a new preset: https://github.com/orlangure/gnomock/blob/master/CONTRIBUTING.md#new-presets
MySQL preset for inspiration: https://github.com/orlangure/gnomock/tree/master/preset/mysql
The objective is to implement a new Preset that spins up DynamoDB docker container, sets up its initial state (user provided data), waits for it to become ready and kills it in the end.
Please note that there are multiple steps required to create a new preset (see the guide above). I'm here to help😼