i can see that you have a runBlocking as a means to test the
client.X
functionality, although the docs point out to this kind of usage (see image), i’m a bit confused, what’s the difference and which one should i be using?
thank you, i got it working as well, didn’t know that you had to have docker running in order to run the test containers
my impl. looks like this
a
antonarhipov
06/04/2024, 10:34 AM
There are two tests that use the TestContainers
1. DatabaseIntegrationTest - doesn't use TestApplication instance all all as it tests the service directly. Here I need runBlocking because some methods required coroutine scope
2. ControllerIntegrationTest - uses TestApplication as the tests are calling the application APIs via the client. Same issue with coroutine scope
antonarhipov
06/04/2024, 10:35 AM
didn’t know that you had to have docker running in order to run the test containers
sure. Docker compatible environment is required to start the containers. I can be anything else than Docker, AFAIK, but I haven't tried