DynamoDB test initializations #35951
nicklasweasel
started this conversation in
Community
Replies: 2 comments 1 reply
-
We inject the dynamoDbenhancedClient in the test class and call |
Beta Was this translation helpful? Give feedback.
1 reply
-
This can also be achieved with quarkiverse/quarkus-amazon-services#317 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
How do people generally go about the task of e.g. creating a DynamoDB table against a localstack before tests and deleting it afterwards?
Apparently QuarkusTestResourceLifecycleManager implementations aren't CDI aware so I can't inject a DynamoDbEnhancedClient. And Arc.container().instance(DynamoDbEnhancedClient.class).get() gives null for the container so it doesn't look enabled.
I could of course create the client->enhanced client through builders but apparently application.properties aren't read because it gets created somewhere else (my default AWS credentials?) because I get "table not found" when running the test.
I could of course force the builder with the same stuff as in the application.properties but at that point I came to the conclusion that "it can probably be done in a more sane way" and that's why I'm here ;-)
Thanks in advance,
Nik
Beta Was this translation helpful? Give feedback.
All reactions