Specsheet

Check documents

Specsheet’s input files are check documents written in TOML. They have a simple enough syntax that you can write them in your everyday text editor.

Writing a check

A check is a table entry, where the name of the table is the name of the check, and the keys and values are the parameters to the check.

For example, here is an HTTP check, with two parameters, url and status:

[[http]]
url = "https://specsheet.software/docs/check-documents"
status = 200

This check makes an HTTP request and asserts that the response has the 200 OK status.

All the checks available can be found at the list of checks.

Entities and state

By default, a check asserts the existence of some kind of entity. For example, this check using the user check will assert that a user with the name panini exists:

[[user]]
name = "panini"

Checks will often have a state parameter, which can be set to 'absent' to assert that an entity does not exist:

[[user]]
name = "torta"
state = "absent"

Check names

Each check has an autogenerated name based on its input parameters. This name gets displayed as the checks are run, and if a check fails, you can tell which one it was based on its name.

To override the autogenerated name, you can provide your own name parameter. For example:

[[cmd]]
name = 'Git is using the correct global excludes file'
shell = 'git config --global core.excludesfile'
stdout = { regex = '~/.gitignore_global' }

Specsheet will display “Git is using the correct global excludes file” when running this check.