<https://pact-foundation.slack.com/archives/C5F4KF...
# protobufs
u
Some details on what problems you are having would be helpful
a
Hey @uglyog! Today I managed to verify one pact using the pact_cli. However, I would like to match the exact value of one field. I was checking this doc but I didnt find it: https://docs.pact.io/implementation_guides/rust/pact_matching#matching-status-codes When I try to match by type, its work fine:
Copy code
matching(type,true)
u
Status codes will always be the same type, as they are always integers
But you mentioned gRPC, do you mean the gRPC status codes?
a
No, Im creating pact for grpc microservice… Im creating one test on the consumer side to generate the contract with this request body:
Copy code
"request", Map.of(
              "id", "matching(type,123)",
              "url", "matching(type,'<https://url.com/>')",
              "url2", "matching(type,'<https://url2.com>')",
              "test", "matching(type,true)"
          ),
However, in this case Im matching only by type and I would like match by the exact value. For example: If I send one request with
id = 123
, I would like to match…. Any other value, I would like to thrown an error.
u
Ok, use
"id", 123
y
Hey Andre, Which language are you creating your consumer pact files with that contain the gRPC interactions.
a
Hey @Yousaf Nabi (pactflow.io) is in java
y
Awesome, you should be able to use the jvm framework to verify your pacts aswell, but you can also use the CLI as you have found 🙂
1
a
Ok @uglyog thanks.