Hi team, We ran into an issue that when the provid...
# protobufs
a
Hi team, We ran into an issue that when the provider always returns a
repeated
enum field in the response, the consumer has to define the expectation of that field in the consumer test. Otherwise the generated pact file will expect empty in that field, thus cause error on the provider side, for example
Copy code
1) Verifying a pact between grpcconsumer and grpcprovider Given feature 'Big Tree' exists - Route guide - GetFeature
    1.1) has a matching body
           $.some_enum -> Expected repeated field 'some_enum' to be empty but received 2 value(s)
The error can be reproduced by the code in this PR https://github.com/pact-foundation/pact-go/pull/523, and we used
pact-plugin-cli protobuf 0.5.4
libpact_ffi 0.4.27
. According to Postel’s law, “any extra field will be ignored by your consumer”, and this seems not to be the case. Could you help take a look? Thank you! cc: @Stanislav Vodetskyi
r
Can you raise a GH issue against the protobuf plugin for this?
a
m
Thanks!
I’m assuming you’re friends with our man @Stanislav Vodetskyi (see also https://github.com/pact-foundation/pact-go/pull/523)
(I’ll close this PR, and link to your issue - much appreciated)
s
Yeah, we reproduced the issue together and opened this PR under my name to demonstrate 🙂 I agree that this is an issue with a plugin vs pact-go itself, but last time I touched rust was almost a year ago, so this was the quickest way to reproduce the issue for us.
m
No probs Stan, this is very helpful (as always) - thanks for putting it together
s
This is mostly done by August 🙂