-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Support HTTPS and self-signed certificates #66
Comments
Thanks @mohanraj-r, have you got a reproducible example I can run? Or at the very least, could you please provide your entire consumer test (I'm assuming it's a consumer test)? In any case, I haven't yet implemented SSL for the underlying mock service, so this would be expected. In your test you are sending a message to I'll change the title of this to enabling SSL for this case, but in the meanwhile I'd suggest you not use an HTTPS server. FWIW and IMO I don't think you get a lot of value from testing SSL from Pact, I'm not sure what you gain over other local tests ensuring your client can make HTTPS calls. (BUT, I'm going to add the feature anyway!). |
I have included the test in the
Agree. But the code under test in my case assumes a
|
Pretty much any code you write for production will need to take a parameter to configure the URL/endpoint to call. It's a pretty trivial matter to modify this. Don't forget, we can add SSL support to the mock service, but you'll then need to either:
As I said, I'll leave this ticket open and when time permits add this feature in. |
In this case it does - it takes the hostname and formats the endpoint with a known scheme.
If you want you can also label it appropriately (low_priority_feature, help_needed, when_time_permits etc) and then close it - to be able to give the high priority issues the needed visibility and attention. Maybe have one meta issue with pointers to such low priority closed issues. Because one of the signs of health I (like many others I presume) look for in a project is number of open issues and more importantly activity/staleness of the issues. |
Thanks @mohanraj-r, appreciate all of the effort going into these tickets BTW! |
A custom tls config can be passed into the provider verification of 2.x.x, closing. |
When tests are run against
https
URL, following error is returnedI have a server object under test which accepts hostname and based on the hostname passed in sets the base URL for the subsequent requests as
https://<hostname>/api
. But testing this with pact gives the errorhttp: server gave HTTP response to HTTPS client
. Is it possible to have a pact interaction work withhttps
scheme instead ofhttp
?Software versions
1.9.2
Expected behaviour
Pact tests are runnable against
https
URLActual behaviour
Tests fail with following error message when running against
https
urlSteps to reproduce
https
url instead ofhttp
Relevant log files
No relevant logs in
pact.log
The text was updated successfully, but these errors were encountered: