Exercise time

You have done a great job writing your first tests for your Swift package. Now it's time for a small exercise. We just added a test to verify that our Provider does what it is supposed to do when we have configured everything correctly. However, we have not tested the cases where the healthcheck.json config file is missing, or where the config for the healthcheck.url is not specified. For this exercise, write another test that verifies that the server starts up when the healthcheck config is not specified and that it returns a 404 Not Found when making a GET request to the /healthcheck route.

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.