I'm trying to perform provider verification using scala-pact implementation. My dockerized service under test is located at http://localhost:9999/my_test_label/my_service
. There is
def runVerificationAgainst[F[_]](protocol: String, host: String, port: Int, clientTimeout: Duration)
function provided by scala-test bu I'm unable to provide such url as mine. The problem is my_test_label
needed by other tests (or anything between port number and service url). The only thing I can do is to invoke the verifier as follow:
runVerificationAgainst("http", "localhost", 9999, 10.seconds)
which ends with verifying the http://localhost:9999/my_service
(my_service
is provided from the pact.json file).
The only workarounds I found is to remove the my_test_label
from the dockerized service (which is hard because of dependencies) or to capture and modify the pact.json file before the verification (which is not a good practise). Is it possible to provide such url into the scala-pact verifier or I need to use pact CLI to achieve the goal?