Closed DunnCoding closed 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.
@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:
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.