You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Config
Loading config
Server
Config route
Create document
Creating a document and getting the correct Document in response
Creating a document and getting sent to the correct webpage
Failing when given bad content
Fetch document
Fetching a document
Fetching a document and getting plain-text
Failing on a non-existent document
Failing on a bad id
Core server
Creating a server instance
Mounting middleware
Registering security headers
Mounting static content
Mounting route handlers
Utility functions
Ratelimiter string parser
Fail on invalid strings (i.e. too many parts, invalid number syntax, number out of range)
Pass on valid strings
ID generation
Generating a phrase
Generating a key
Helpers
Count lines of a document and convert that into HTML line identifiers
Validate body of a create document request
Identifying and decoding POST request bodies
Writing JSON objects to an HTTP response writer
Writing Errors to an HTTP response writer
The text was updated successfully, but these errors were encountered:
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.
lukewhrit
changed the title
bug: Code isn't tested
Road to 100% Coverage
Jun 28, 2024
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
The text was updated successfully, but these errors were encountered: