lukewhrit / spacebin

🔭 spacebin: text sharing for the final frontier
https://spaceb.in
Apache License 2.0
92 stars 9 forks source link

Road to 100% Coverage #153

Open lukewhrit opened 4 years ago

lukewhrit commented 4 years ago

Description

If we ever want Spacebin to be stable and suited for use in production environments, we must ensure builds are reproducible and that code issues are caught before they are pushed to a release. To this end, we want to create unit tests for every aspect of the program that checks and ensures everything works according to the specifications.

This issue contains a list of every part of Spacebin that should be tested, and whether it's currently being tested or not. Our top priority should be the Server (API) functions. We want to make sure that API routes are returning what we want.

Progress

lukewhrit commented 1 year ago

We need a library for mock database interactions in order to implement tests for Fetch/Create endpoints

lukewhrit commented 1 year ago

We need to configure codecov to ignore the httplog middleware (util/logger.go) and perhaps the config route handler. As far as I can tell that code cannot error under any reasonable circumstance since it's being encoded from a strictly typed struct.