mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-16 00:18:09 +00:00
testing docs
This commit is contained in:
26
test/README.md
Normal file
26
test/README.md
Normal file
@ -0,0 +1,26 @@
|
||||
# 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](https://wiki.wellorder.net/wiki/nostr-datasets/) 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
|
Reference in New Issue
Block a user