New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote pact mock server #152
Comments
This should help https://docs.pact.io/docker Also, you don't need to install Ruby. The standalone package it downloads already includes a Ruby runtime. |
The problem is, Pact PHP might not support providing a standalone mock server. The Ruby impl does. You might need to raise a feature request. |
I guess this can be that feature request. @catalinzanfir-am is your problem that you can't run any pact tests within a Docker environment? Or is it that you want to deploy the pact mock server on a separate docker container to the PHP service and that Pact PHP doesn't support that model? (or something else). |
Hello @mefellows, Let me describe once again my situation:
Well.. I'm not really sure what's happening. I'm guessing the ruby exec isnt able to start due to something missing from my docker images.. (basically the images only have php and nginx) Back to your questions, but most importantly i wanted to obtain this: thank you ps: i dont have |
OK, as for running the mock service in docker - please see my comment above. In fact, we already have a docker container you can use. You can test this in isolation of the second point. You'll need to verify this yourself, but looking at the way the docs specify it, you could just not start/stop the server. This is more or less consistent with the way we allow it in Pact JS:
There may be some state within the |
Alright, I will test the consumer tests with this docker image using:
. However, i thought, since the following variables are available in the phpunit.xml file:
you could just provide an url to a pact mock server (one that is hosted on in docker, started, and listening to inputs) |
I don't know much about that, but give it a go! |
Hello again.
So i guess it solves the issue, but it's a bit tricky to use because:
@mefellows / @bethesque i have some other questions, but i don't wanna spam the issues tab. are you interested to discuss on some platform of your choice(slack, discord, skype etc)? |
Good to hear it works - that all sounds about right to me. Sure, please join us at slack.pact.io and chat in the #pact-php channel. |
Hello,
I have microservices that are running in a slim php image inside docker, therefore I am unable to install ruby on them, so my tests fail to connect to the internal mock pact server, since ruby isn't(and can't be) installed.
What are my options in order to have a integrated running pact environment within kubernetes?
Thanks.
The text was updated successfully, but these errors were encountered: