Documentation
¶
Overview ¶
genconfigs writes dynamic test fixtures that depend on deterministically derived keypairs (so test Go code and config YAML agree on the same pubkey).
Run from the tests/ directory before `docker compose up`:
go run ./genconfigs
The NIP-86 fixtures are written from canonical templates on every run. They're bind-mounted read-write into the test container, and the relay's AtomicWriteFile falls back to an in-place write when rename-over-bind-mount fails (EBUSY) — so a `grain_update*` call during the suite writes re-emitted YAML/JSON straight back to the host file, losing the hand-maintained shape. Regenerating from templates here restores that shape every run, keeping `git status` clean regardless of what the tests mutated (issue #78).