You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once we bring up the docker image for a local broker at localhost:9292 a catch 22 situation occurs where the default step13 code expects the broker to contain some pacts. Since it's a new broker with no existing pacts the gradle build fails. That failure prevents us from adding new pacts. In other words, the build fails because it needs existing pacts in the broker. However, in order to add those pacts for the first time, the build must pass.
One way to solve this is to comment out the last 3 lines in providers/springboot-provider/build.gradle where a check is made to the broker to find out whether there are any existing pacts.
Adding the code here in case it helps anyone else stuck with the same problem on step#13.
Inside providers/springboot-provider/build.gradle file, commenting out the following line helps prevent build failure for step13
// Workaround for 'the gradle build failing if no pacts exist on the broker'
// if (project.hasProperty('pactBrokerUser') && pactBrokerUser != '<YOUR USER>') {
// hasPactsFromPactBroker(pactBrokerUrl, authentication: ['Basic', pactBrokerUser, pactBrokerPassword])
// }
The code in step 13 should be modified so that the gradle build doesn't fail if no pacts exist in the local broker.
The text was updated successfully, but these errors were encountered:
uglyog
added
the
bug
Indicates an unexpected problem or unintended behavior
label
Mar 27, 2021
When trying out the steps given in the pact-workshop ( https://github.com/DiUS/pact-workshop-jvm ) , step 13 is bound to fail.
Once we bring up the docker image for a local broker at localhost:9292 a catch 22 situation occurs where the default step13 code expects the broker to contain some pacts. Since it's a new broker with no existing pacts the gradle build fails. That failure prevents us from adding new pacts. In other words, the build fails because it needs existing pacts in the broker. However, in order to add those pacts for the first time, the build must pass.
One way to solve this is to comment out the last 3 lines in providers/springboot-provider/build.gradle where a check is made to the broker to find out whether there are any existing pacts.
Adding the code here in case it helps anyone else stuck with the same problem on step#13.
Inside providers/springboot-provider/build.gradle file, commenting out the following line helps prevent build failure for step13
The code in step 13 should be modified so that the gradle build doesn't fail if no pacts exist in the local broker.
The text was updated successfully, but these errors were encountered: