is there a way to include Authorization header in ...
# protobufs
j
is there a way to include Authorization header in provider verification? I found example which is not using this plugin
Copy code
@TestTemplate
  @ExtendWith(PactVerificationInvocationContextProvider.class)
  void pactVerificationTestTemplate(PactVerificationContext context, HttpRequest request) {
    request.addHeader("Authorization", "Bearer ...");
    context.verifyInteraction();
  }
Unfortunately it fails with
No ParameterResolver registered for parameter [org.apache.http.HttpRequest arg1] in method [void io.pact.example.grpc.consumer.PactProviderTest.pactVerificationTestTemplate(<http://au.com|au.com>.dius.pact.provider.junit5.PactVerificationContext,org.apache.http.HttpRequest)].
u
Because it's using the plugin, there is no HTTP request to inject into the test.
👍 1
I'll need to investigate how to do this
j
Thanks a lot 🙂 This is last step missing to be able to demo this plugin to our engineering here at Pure Storage 😉