nak
nak copied to clipboard
Draft: Relay acid test
The goal is nak acid wss://relay.damus.io
, and then it runs a test suite against the relay which will pass/fail certain tests.
Here's the output so far:
➜ nak git:(acid) ./nak acid wss://relay.damus.io
NIP-11... PASS
Publish event... PASS
This is my first time writing Go and I have no idea what I'm doing.
My first idea was to use Go's internal testing framework somehow. But I couldn't figure out how to compile that into the binary with proper CLI output.
There are a lot more things to test. Eg: https://github.com/nostr-protocol/nips/discussions/1084
Originally I envisioned making this a web UI. But then I thought a command line tool would be better and more convenient. So I had the idea to build this into nak.
Forget about Go's internal test framework, that's not very useful.
The way you're doing it here looks reasonable.
@mikedilger solved this problem with https://github.com/mikedilger/relay-tester, so I'll close this MR.