southerntofu 2fc9796f38 | ||
---|---|---|
demo | ||
src | ||
.gitignore | ||
Cargo.toml | ||
README.md |
README.md
checkrfc - measure implementation of a ~RFC
checkrfc is a utility to perform tests contained within a ~RFC.
This is alpha-quality software.
Declaring tests
Tests are contained within a Markdown document, in a section containing a compliance
id. Each test consists of a codeblock with either python3
or bash
set as a language. Additional subsections can be defined so heading titles can be used for human-readable context information about which tests succeeded or failed.
# Specification
...
# Compliance {#compliance}
## Check server supports HTTPS
```bash
curl https://${1} || exit 1
```
## Check www subdomain supports HTTPS
```
curl https://www.${1} || exit 1
```
For now, only naive client-to-server tests are supported. Each test takes a positional argument that contains the hostname (FQDN) of the server to check.
Running tests
Run tests:
$ checkrfc -d thunix.net demo/https-support.md
Run with debug output:
$ RUST_LOG=debug checkrfc -d thunix.net demo/https-support.md
Here's the full help page:
checkrfc 0.1.0
southerntofu <southerntofu@thunix.net>
Check a server for ~RFC compliance.
USAGE:
checkrfc <rfc> --domain <domain>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-d, --domain <domain>
ARGS:
<rfc>
TODO
- extract tests from markdown document, figure out the test's lang
- execute tests
- make a library
- parse tests from HTML document
- generate implementation status code from tests
- output nice things about how well tests went
- support different types of test (s2s, c2s, integration tests)