#1184 Unable find pacts when using pactBrokerUrl with context path
Issue created by
JesusHM
Software versions
•
OS: Mac OSX 14.3.1
•
Consumer Pact library: Pact JS v12.2.0
•
Provider Pact library: Pact JS v12.2.0
•
Node Version: v18.18.2
Issue Checklist
Please confirm the following:
☑︎ I have upgraded to the latest
☑︎ I have the read the FAQs in the Readme
☑︎ I have triple checked, that there are
no unhandled promises in my code and have
read the section on intermittent test failures
☑︎ I have set my log level to debug and attached a log file showing the complete request/response cycle
☐ For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem
Expected behaviour
On verification phase, when configuring the
pactBrokerUrl property witch contain a context path, ( for example
https://my.domain.com**/pact**), pact should be able to fetch the corresponding contracts
Actual behaviour
Pact remove the context path from the pactBrokerUrl, trying to get them from the parent (
https://my.domain.com/) , and therefore, fail
Steps to reproduce
1. Create a pact broker with a contextpath, for example
https://my.domain.com/pact
2. Publish a contract in the broker
3. Configure
pactBrokerUrl to the broker with context path
4. Try to execute the verification
Relevant log files
INFO ThreadId(02) pact_verifier::pact_broker**: Fetching path '/' from pact broker ERROR ThreadId(0") pact_verifier: No pacts found for provider 'test-provider' matching the given consumer version selectors in pact broker '<https://my.domain.com/pact>': Link/Resource was not found - No pacts for provider 'test-provider' were found in the pact broker. URL: '<https://my.domain.com/pact>'
pact-foundation/pact-js