genconfigs

command
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 7 Imported by: 0

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL