cloudstate icon indicating copy to clipboard operation
cloudstate copied to clipboard

TestContainers for Local Dev

Open jamesward opened this issue 5 years ago • 2 comments
trafficstars

When doing local development the proxy can be started with the following to connect to the host's function port:

docker run -it --rm -p9000:9000 --network="host" cloudstateio/cloudstate-proxy-dev-mode -Dcloudstate.proxy.user-function-port=8080

Which is cool and should be documented somewhere. But also this means that TestContainers could be used for local dev / testing, which would be extra cool.

jamesward avatar Jun 24 '20 18:06 jamesward

Hello @jamesward In fact it is very interesting and an approach that has already been used in support languages like here for example:

https://github.com/cloudstateio/kotlin-support/blob/master/integration-test/src/test/kotlin/io/cloudstate/kotlinsupport/tests/IntegrationTest.kt

sleipnir avatar Jun 24 '20 19:06 sleipnir

@jamesward yes this is pretty cool and little known documentation wise. I also use this image quite a lot for language support development running the proxy and also the TCK and it's very helpful.

marcellanz avatar Jun 24 '20 20:06 marcellanz