Eran Bergman
07/29/2024, 9:45 PMvalueFromProviderState
that the REST API has?
this is in case I would like to inject something like entity ID of an entity created during the state setup into the gRPC callMatt (pactflow.io / pact-js / pact-go)
Eran Bergman
07/30/2024, 4:45 AMEran Bergman
07/31/2024, 10:13 PMEran Bergman
07/31/2024, 10:15 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
rholshausen
07/31/2024, 11:52 PMrholshausen
07/31/2024, 11:53 PMrholshausen
08/01/2024, 12:04 AMMatt (pactflow.io / pact-js / pact-go)
rholshausen
08/01/2024, 12:06 AMMatt (pactflow.io / pact-js / pact-go)
Eran Bergman
08/01/2024, 7:47 PMheaderFromProviderState
as well?
this is what I'm doing for authentication at the moment:
@TestTemplate
@ExtendWith(PactVerificationInvocationContextProvider.class)
void pactTestTemplate(PactVerificationContext context, RequestData requestData) {
if (pactGrpcGlobalContext.getToken() != null) {
requestData.getMetadata().put("Authorization", pactGrpcGlobalContext.getToken());
}
context.verifyInteraction();
}
which isn't ideal because I'm forced to store the token that is generated at state setup (unique to the entity I create for the test) in a "global" bean which means I can't parallelize the test execution properlyEran Bergman
08/06/2024, 3:15 PMheaderFromProviderState
- to have parity with the REST stack (where it makes sense to have it at least)rholshausen
08/06/2024, 11:06 PMEran Bergman
08/07/2024, 12:27 AMRequestData.metadata
so I guess that will work for us? - I'm not too sure how that works internally TBHEran Bergman
08/07/2024, 12:27 AMrholshausen
08/07/2024, 12:29 AMrholshausen
08/07/2024, 12:32 AMdo you mean a separate PR or a separate release?More like a separate PR, but I won't create an actual PR as there is really nobody to review it. I'll first create example projects for the bodies, make the changes, and then get those example tests to pass. We can release at this point, but as you need it for the metadata I'll then repeat the process.
rholshausen
08/07/2024, 5:31 AMEran Bergman
08/08/2024, 5:35 PMrholshausen
08/08/2024, 11:42 PMrholshausen
08/08/2024, 11:52 PMEran Bergman
08/09/2024, 4:35 AMEran Bergman
08/09/2024, 4:36 AMrholshausen
08/09/2024, 4:38 AM