Hi. I'm trying to run the bi-directional example w...
# pactflow
c
Hi. I'm trying to run the bi-directional example with Postman: https://docs.pactflow.io/docs/examples/bi-directional/provider/postman/ I'm trying to go through that example on a Windows WSL2 system. I get as far as trying to execute the command "make test_and_publish" which fails with the following error:
Copy code
docker run --rm -v //home/someuser/ContractTesting/Bi-Directional/cypress_postman/<example-bi-directional-provider-postman://home/someuser/ContractTesting/Bi-Directional/cypress_postman/example-bi-directional-provider-postman> -w /home/someuser/ContractTesting/Bi-Directional/cypress_postman/example-bi-directional-provider-postman -e PACT_BROKER_BASE_URL -e PACT_BROKER_TOKEN pactfoundation/pact-cli:latest pactflow publish-provider-contract \
      oas/swagger.yml \
      --provider "pactflow-example-bi-directional-provider-postman" \
      --provider-app-version 1b8982-master+1b8982 \
      --branch master \
      --content-type application/yaml \
      --verification-exit-code=0 \
      --verification-results newman/newman-run-report-2022-07-27-06-17-15-353-0.json \
      --verification-results-content-type text/plain\
      --verifier postman
/pact/entrypoint.sh: exec: line 15: pactflow: not found
make[1]: *** [Makefile:57: publish_provider_contract] Error 127
make[1]: Leaving directory '/home/someuser/ContractTesting/Bi-Directional/cypress_postman/example-bi-directional-provider-postman'
make: *** [Makefile:49: test_and_publish] Error 2
Any hints what could be the cause of the problem?
m
My guess is that it’s not happy with the escaping of the command
What happens when you just run
docker run --rm pactfoundation/pact-cli:latest pactflow publish-provider-contract
c
Then I get just the following error: /pact/entrypoint.sh: exec: line 15: pactflow: not found
m
hmmm
sounds like you might not have the latest image?
maybe do a
docker pull pactfoundation/pact-cli:latest
and try again?
c
Ok, after pulling the latest image that error disappeared, I now get this: No value provided for required options '--provider', '--provider-app-version', '--broker-base-url' So does this mean that the
make test_and_publish
command in the postman example was not pulling the latest docker image?
m
well, yes I guess so. We could probably force it to do a
pull
c
Hmmm, in fact I never pulled any docker image myself, so that command must have pulled the first docker image by itself, is that so?
m
either that, or you’ve previously run other pact examples that use it, and just happened to have a slightly older version
or, in fact, the same example a month or two ago probably didn’t use that command
c
Aha, thats very likely, because I've been indeed running pact examples for some time now in that same environment. So that explains everything. Thanks a lot.
👍 1