Hello there, I am totally new to Pact (and contra...
# protobufs
a
Hello there, I am totally new to Pact (and contract testing) but I am trying to implement a POC using Pact to make contract tests using the protobuf plugin. I already managed to right tests on the consumer side using the example here as a guide. I am now trying to figure out how to make the tests on the provider side, but without much success so far. I have a few questions about it: - I am trying to run the tests as a gradle task, in a similar way to what is done here (I am, of course, using the V4 pact spec, not the one used in that example), without a mock server or anything. All I am doing is annotating a method with
@PactVerifyProvider
which then returns an instance of the protobuf message that I want to test against the one in the pact (generated by the consumer). Is that possible or even a correct approach? - My provider sets the target to a MessageTestTarget like so
Copy code
@BeforeEach
  void before(PactVerificationContext context) {
    context.setTarget(new MessageTestTarget());
}
Is that the right way to do it? Or should I used the PluginTestTarget instead? When I tried to use it, I got an exception about not providing a transport (which, as far as I could understand, can only be gRPC, which I am not using).