Hello guys, I need some suggestions, feel free to ...
# protobufs
z
Hello guys, I need some suggestions, feel free to bash at me if you think it’s a bad idea 😄 So, we are working on the creation of GRPC-based micro-services using Golang. The thing is, we haven’t created a consumer service yet, rather, we built a cli-based application that would act as a client for now. And the provider service is almost developed. I want to test the provider service, so I’m wondering what happens if I write the pact file manually, pass it to the provider service -> spin up the provider and run pact tests to make sure that provider is able to handle the requests. And we will later replace the “mocked” pact file with a real one generated by the consumer in the future. I understand that it’s a kind of hacky way to test out the provider’s service, can you please provide your opinions on that? (My goal here is not to test the contract or integration between two services, rather, I just want to make sure that my provider service works correctly - I assume that if we go this way, then it will be easy in the future to extend the tests to test the integration with consumers)
m
I wouldn’t say it’s a bad idea, but just note that Pact is not really a functional testing tool. You should probably still do additional checks - e.g. side effects etc.
z
Thanks for your response. Yes I understand that pact is not meant for functional testing. However, in my case provider service doesn’t even have any db. Just need to ensure that the service works in a nutshell.
👍 1
t
I agree with Matt - depending on what you’re doing, this might be ok (or not).