upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md33
1 files changed, 20 insertions, 13 deletions
diff --git a/README.md b/README.md
index 0d454bc..2418d14 100644
--- a/README.md
+++ b/README.md
@@ -129,17 +129,28 @@ We have two test suites:
129# Run unit tests (no external dependencies) 129# Run unit tests (no external dependencies)
130nix develop -c cargo test --lib 130nix develop -c cargo test --lib
131 131
132# Run integration tests (tests our relay implementation) 132# Run all integration tests (automatic relay management)
133# First, start ngit-grasp relay in one terminal: 133nix develop -c cargo test --test nip01_compliance --test nip34_announcements
134NGIT_BIND_ADDRESS=127.0.0.1:7000 nix develop -c cargo run
135 134
136# Then in another terminal, run integration tests: 135# Run NIP-01 compliance tests
137nix develop -c cargo test --test announcement_tests --ignored 136nix develop -c cargo test --test nip01_compliance
138 137
139# Or use the test script (starts relay automatically): 138# Run NIP-34 announcement tests
140./test_relay.sh 139nix develop -c cargo test --test nip34_announcements
140
141# With detailed output
142nix develop -c cargo test --test nip01_compliance -- --nocapture
143
144# Run specific test
145nix develop -c cargo test --test nip01_compliance test_nip01_smoke
141``` 146```
142 147
148**Integration tests automatically:**
149- Start a fresh relay instance
150- Run compliance tests using grasp-audit library
151- Clean up when done
152- No manual relay management needed!
153
143**2. GRASP Audit Tool (grasp-audit)** 154**2. GRASP Audit Tool (grasp-audit)**
144 155
145The audit tool tests GRASP compliance of any relay (including ours or external ones). 156The audit tool tests GRASP compliance of any relay (including ours or external ones).
@@ -151,12 +162,8 @@ cd grasp-audit
151# Run unit tests 162# Run unit tests
152nix develop -c cargo test 163nix develop -c cargo test
153 164
154# Test against our ngit-grasp relay: 165# Test against any relay (including external ones)
155# First, start ngit-grasp (in another terminal): 166nix develop -c cargo run -- --url wss://relay.example.com
156cd .. && NGIT_BIND_ADDRESS=127.0.0.1:7000 nix develop -c cargo run
157
158# Then run audit:
159nix develop -c cargo run -- --url ws://127.0.0.1:7000
160 167
161# Or test against any external relay: 168# Or test against any external relay:
162nix develop -c cargo run -- --url wss://relay.example.com 169nix develop -c cargo run -- --url wss://relay.example.com