pact-foundation / pact-mock_service

Provides a mock service for use with Pact
https://pact.io
MIT License
72 stars 68 forks source link

given pacts dir not used #111

Closed ireinhart closed 4 years ago

ireinhart commented 4 years ago

Hello,

I have a strange behavior and could not say anything other than "not working".

If I start the service with pact-mock-service start --pact-dir=build/test/pact

the pacts are written to ./pacts and not ./build/test/pact/pacts

How can I debug that? How can I change the directory of written pacts?

All other options like --pid-dir and -l working.

Best, Ingo

bethesque commented 4 years ago

Looks like the dir is not being passed through to something. Can you reproduce it with https://github.com/pact-foundation/pact-ruby-standalone-e2e-example please?

ireinhart commented 4 years ago

Thanks for your support. I try your issue repo and found a solution for my problem.

We are using a library that set the pact_dir value on every request. That seams to overwrite the server settings. pact_dir is an interesting option - in my point of view ;-)

I update the library and now it works like expected.

You can look into it: https://github.com/chefkoch-dev/pact_consumer_dart/commit/a16193325cca88998ff7b35d2b7345f8b2663959#diff-0cacca8d4f91b310f265ea85f6b69e18L39