We also looked at passing PACT_URL into the jvm va...
# pact-jvm
b
We also looked at passing PACT_URL into the jvm vars based on this commit. We use maven and surefire-plugin. This also did not work.
Copy code
mvn clean test \
-PproducerContractTestWithBroker \
-Dtest=GetCartsProviderContractWithBrokerRunnerTest \
-DPACT_URL="<https://blah.pactflow.io/pacts/provider/ngc-provider-service/consumer/ngc-consumer/version/12341234>" \
u
The property needs to be:
Copy code
pact.filter.pacturl
🙌 1
b
Can we leave it blank, and set it in the command line when needed like this
Copy code
mvn clean test \
-PproducerContractTestWithBroker \
-Dtest=GetCartsProviderContractWithBrokerRunnerTest \
-Dpacturl="<https://blach.pactflow.io/pacts/provider/ngc-provider-service/consumer/ngc-consumer/version/1234>" \
u
No, the POM needs to have the property from the command line
b
-Dpact.url=“blah”
u
Yeah
b
hrm, didnt seem to work
I know i have a pact here that should fail, but my tests are all passing with the pact.url set on provider main
u
You'll need to look at at debug level logs to see what is going on
b
Copy code
Pending Failures:

1) Verifying a pact between ngc-consumer and ngc-provider-service - Get all carts details has a matching body

    1.1) body: $.meta.page Expected noLimit=1766809366 but was missing

        {
        -  "count": 264599894,
        -  "noLimit": 1766809366,
        -  "offset": 2071672504,
        -  "total": 621680125
        +  "limit": 200,
        +  "total": 1,
        +  "offset": 0,
        +  "count": 1
        }
So it looks like it did fail, but my tests showed no failures. Interesting
u
Pending Failures:
It is pending, it will not fail the build
b
ohhhhh
I read “This test should correctly fail with the error
Could not find key "color"
in the output.” and expected failed tests, but since its pending you have to read the output
message has been deleted
u
I'm a bit confused, that workshop is a node project, you are using JVM, why would you expect the same error when your payload looks different
b
I mean, we are doing the workshop steps, but we make different changes and assert as needed so we can follow along
…but in jvm because well we want to fully grok the workflow
we are also in gitlab so there are a few differences, but we are almost done now
we expect a similar workflow step here, we want to see the failure in the provider localhost when it pulls the contract that does not match
The workshop is a good way to demo pactflow working. So we will run through every step but in our mvn/jvm/gitlab. Does that make it clear?
👍 1
So in the test log it also talks about bad auth tokens, but I double checked it, and the auth token is the read/write pact token.
I PM’d you the log as it has personal details
It also talks about Given request with bad headers, bad request headers
u
The auth tokens it is talking about are from you auth system, not pactflow
I think you should mock that out if possible