This directory contains all the functional testing infrastructure for Anubis.
A smoke test is a folder with an executable file named test.sh. This test.sh file is responsible for starting up Anubis, running some logic ideally with backoff-retry, and then returning 0 for success or anything else for failure. CI will backoff-retry smoke tests to ensure they aren't flaky.
- Source
lib/lib.sh. It is there to save you time. - If you are starting services with
docker compose, usebuild_anubis_koand load anubis fromko.local/anubis. - Make tests as deterministic as possible.
- Use the default configuration as much as possible.
- Make tests run as fast as possible.
- If you need to do anything involving reading response metadata, write your logic in JavaScript and put it in
test.mjs. - If your smoke test exists because of an event, horrifying discovery, or other tale of woe, record it in
README.mdas a tale of woe. See the gitweb smoke test for an example.
Make sure to add smoke tests to the smoke testing GitHub Actions workflow.