Run SwiftyRequest tests against local test server#61
Conversation
| } | ||
|
|
||
|
|
||
| // TODO: What does this test actually test? |
There was a problem hiding this comment.
Do we want to keep this comment? This test is currently doing the same as testResponseData but with a Client certificate attached. It would be nice for our Kitura server to check the certificate in some way but i'm not sure if we even support 2 way SSL in Kitura using client certificates.
There was a problem hiding this comment.
I think we should keep it, because I think the test is misleading. We used to use self-signed.badssl.com with this test, which is not the right endpoint because it doesn't make use of client certificates (much as the current Kitura server does not).
However, badssl does actually provide a facility for testing client certificates: https://stackoverflow.com/questions/38095559/https-test-server-that-checks-client-certificates
We could try implementing this and see if we can make the test more meaningful.
There was a problem hiding this comment.
OK - I've experimented with the client certificate test, and discovered that actually, the code that is supposedly providing client certificate support is completely broken. It was introduced in #34, but the test doesn't actually test client certificate support, and so I suppose it went unnoticed.
Fixing this is outside the scope of this PR - I'll raise a separate issue.
Andrew-Lees11
left a comment
There was a problem hiding this comment.
This is a nice solution to testing against a Kitura server without having to add Kitura as a dependency and removes our requirement on external APIs.
Resolves #55
Also:
performSubstitutions(), and this was causing us to always take the default authentication handling route because URLComponents was trying (and failing) to initialize from a URL which still contained templated elements.