-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to properly test #494
Comments
Depends what test you are looking for. For my case, I used testcontainers to spin-up containers and test Dapr functionalities during the integration testing phase. It's particularly useful when a service provider doesn't offer a way to test their proprietary service locally. With Dapr it's just a matter of swapping a container with an open-source alternative. You can find an example in the following repository: https://github.com/etiennetremel/testcontainers-dapr-example |
I'm following a similar approach but without docker, just by running the binnary ( |
I haven't played with GRPC for tests, but I wouldn't expect much difference from a standard HTTP server |
have you started a HTTP server for tests? |
The examples in this repo are validated using mechanical markdown - https://github.com/dapr/mechanical-markdown |
I'm opening this issue to ask how should I test components that are using dapr.
In my case, I needed to make sure that my code was using pubsub correctly.
I ended up
exec.Command("dapr", "run", ... more args ...)
and creating aClient
and aService
that conneted to the dapr daemon. While this worked, I wonder if there is a programmatic way to do this. I skim through this repo anddapr/dapr
and I could find anything.Is this the right way to test? is there a better one?
Thanks!
The text was updated successfully, but these errors were encountered: