pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.08k stars 479 forks source link

Getting error 403 (after downloading contract from the broker) #918

Open eduardoroche opened 5 years ago

eduardoroche commented 5 years ago

As you guys can see:

Verifying a pact between Consumer and Provider [from Pact Broker http://localhost:82/pacts/provider/Provider/consumer/Consumer/version/abc (Tag tag-ultima)]

The download is done from the Pact Broker, and it fails during the execution. If I run it locally, it works.

Verifying a pact between Consumer and Provider - Represents a scenario of sending request to /foo returns a response which has status code 200 assert expectedStatus == actualStatus | | | 200 | 403 false

This is my pom.xml

au.com.dius pact-jvm-provider-maven_2.12 ${pact-jvm-provider-maven_2.12.version} Provider http://localhost:82/ tag-ultima true

Please, could someone help me?

uglyog commented 5 years ago

403 is the Forbidden response. It probably means your provider is rejecting the request because it does not have the appropriate authorization. You will need to either configuration the authorization or test your provider with authorization disabled.