mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-15 16:13:00 +00:00
strfry testing docs
Tests should be run from the root of the project.
Tests for event writing, including replacements, deletions, etc:
perl test/writeTest.pl
Fuzz tests
Note that these tests need a well populated DB. For best coverage, use the wellordered 500k data-set:
zstdcat ../nostr-dumps/nostr-wellorder-early-500k-v1.jsonl.zst | ./strfry import
If successful, these tests will run forever, so you can run them overnight to see if any errors occur.
The tests are deterministic, but you can change the seed by setting the SEED
env variable.
These commands test the query engine, with and without limit
:
perl test/filterFuzzTest.pl scan-limit
perl test/filterFuzzTest.pl scan
These commands test the monitor engine:
perl test/filterFuzzTest.pl monitor