Kitura / SwiftyRequest

SwiftyRequest is an HTTP networking library built for Swift.
Apache License 2.0
110 stars 19 forks source link

Remove external dependencies from tests #55

Closed DunnCoding closed 5 years ago

DunnCoding commented 5 years ago

Currently the tests rely on external APIs and an API key to complete.

This makes the tests fragile, and raises issues when the API key expires.

We should consider making the API requests to something we can control to ensure more robust tests in the future.

djones6 commented 5 years ago

See #53 - one test is actually passing despite the expired API key as the server's response is non-empty, however it's not the response we were expecting.

djones6 commented 5 years ago

@Andrew-Lees11 and I discussed this recently. Our suggestion is to create a SwiftyRequest test server application, which is a standalone SwiftPM project (based on Kitura, similar to Kitura-Sample), suitably named to indicate that it is test material (such as TestServer/).

CI would then work as follows: