-
Notifications
You must be signed in to change notification settings - Fork 43
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
ATS blocking mockserver interaction #108
Comments
You can start the pact-ruby-standalone with self signed ssl and run your tests on https://localhost. And in your api code you can set it to accept self signed certs on localhost only. That way you don't need to edit the ATS of your app. Check the unit tests in this repo for an example. (I'm writing this on a mobile phone, but if you still struggle I can later point you to the code that handles ssl situations) |
An example on how to start the You need to have your API client implementation's And when writing your pact tests you set up your The reason your tests succeed when changing the setting on the actual App's target is because you are (should be) testing your App's API client implementation. And you're testing that it does what you expect it to and what it needs to do, eg: make a network request over http(s) to a provider (server) and that it can handle the "expected" response. |
Okay, thank you for the clarification. |
@thomas-br if you are still experiencing trouble getting https://localhost running, we've encountered an anomaly as described in this comment. |
I was setting up pact-consumer-swift following your guide but struggling currently during the execution of my contract test.
By default my test is failing due to an ATS error:
Also setting the following settings to my TestTarget's Info.plist does not work:
It does work though when setting it to the actual App-Target's plist, where I am then able to successfully run my contract test.
But setting it on the App generally is not what I want, also when looking at it from a security point of view or regarding a potential AppStore review.
How are you guys dealing with it normally?
I haven't found anything related to ATS in the docs here or in any example project.
The text was updated successfully, but these errors were encountered: