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
I have been trying to create tests to be run when the contract_requiring_verification_published event is published by the Pact Broker.
I believe I need to create tests that receive information about the specific Pact to be verified, probably the Pact URL.
The PactUrl annotation seems to require a hardcoded URL, which won't work for this use case, so I have been looking at the VersionedPactUrl annotation.
From my experiments, and looking at the code, it seems that the auth value provided to the VersionedPactUrl annotation gets ignored by the VersionedPactUrlLoader.
In particular I have tried debugging
I can see the auth value on the VersionedPactUrl passed here:
VersionedPactUrlLoader was for a specific use, where you have a static URL and just need to replace a version in the URL each time.
The proper way to do it is add @AllowOverridePactUrl to your test, then set the pact.filter.pacturl JVM property or environment variable with the URL from the webhook call. That property will need to be set on the test JVM, not the build tool JVM.
I have been trying to create tests to be run when the
contract_requiring_verification_published
event is published by the Pact Broker.I believe I need to create tests that receive information about the specific Pact to be verified, probably the Pact URL.
The
PactUrl
annotation seems to require a hardcoded URL, which won't work for this use case, so I have been looking at theVersionedPactUrl
annotation.From my experiments, and looking at the code, it seems that the
auth
value provided to theVersionedPactUrl
annotation gets ignored by theVersionedPactUrlLoader
.In particular I have tried debugging
auth
value on theVersionedPactUrl
passed here:pact-jvm/provider/src/main/kotlin/au/com/dius/pact/provider/junitsupport/loader/VersionedPactUrlLoader.kt
Line 10 in 4752365
VersionedPactUrlLoader
calls thePactUrlLoader
, it does not provide a value for theauthentication
argument: comparepact-jvm/provider/src/main/kotlin/au/com/dius/pact/provider/junitsupport/loader/VersionedPactUrlLoader.kt
Line 9 in 4752365
pact-jvm/provider/src/main/kotlin/au/com/dius/pact/provider/junitsupport/loader/PactUrlLoader.kt
Line 16 in 4752365
I notice that this code was written nearly four years, so I wonder
contract_requiring_verification_published
event?The text was updated successfully, but these errors were encountered: