upleb.uk

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

summaryrefslogtreecommitdiff
path: root/grasp-audit/README.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-11-05 11:05:53 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-11-05 11:09:21 +0000
commitff00d106da0abd734a233e6445cdd81ffb5f1d9f (patch)
treeeb9b5b552e653104c63c29b250670628d21dd368 /grasp-audit/README.md
parent86077d24e7cc8ff9d474a5947f0151d005f9f747 (diff)
docs: fixed desired grasp-audit behaviour in README.md
Diffstat (limited to 'grasp-audit/README.md')
-rw-r--r--grasp-audit/README.md36
1 files changed, 10 insertions, 26 deletions
diff --git a/grasp-audit/README.md b/grasp-audit/README.md
index b73d72b..3787fee 100644
--- a/grasp-audit/README.md
+++ b/grasp-audit/README.md
@@ -44,8 +44,8 @@ cargo install --path .
44# Run smoke tests against local relay 44# Run smoke tests against local relay
45grasp-audit audit --relay ws://localhost:7000 --mode ci --spec nip01-smoke 45grasp-audit audit --relay ws://localhost:7000 --mode ci --spec nip01-smoke
46 46
47# Audit production server (read-only) 47# Audit production server
48grasp-audit audit --relay wss://relay.example.com --mode production --spec all 48grasp-audit audit --relay wss://grasp.example.com --mode production --spec all
49``` 49```
50 50
51## Test Specifications 51## Test Specifications
@@ -77,9 +77,9 @@ All audit events include special tags:
77```json 77```json
78{ 78{
79 "tags": [ 79 "tags": [
80 ["grasp-audit", "true"], 80 ["t", "grasp-audit"],
81 ["audit-run-id", "ci-a1b2c3d4-e5f6-7890-abcd-ef1234567890"], 81 ["r", "audit-run-id-ci-a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
82 ["audit-cleanup", "2025-11-03T12:00:00Z"] 82 ["r", "audit-cleanup-2025-11-03T12:00:00Z"]
83 ] 83 ]
84} 84}
85``` 85```
@@ -134,7 +134,7 @@ nix develop
134cargo test 134cargo test
135``` 135```
136 136
137### Integration Tests Against ngit-relay 137### Integration Tests Against ngit-relay docker image
138 138
139Test against the reference GRASP implementation to ensure compatibility. 139Test against the reference GRASP implementation to ensure compatibility.
140 140
@@ -151,31 +151,15 @@ See `test-ngit-relay.sh` for full setup/cleanup details.
151 151
152```bash 152```bash
153# Start relay on a specific port (example uses 18081) 153# Start relay on a specific port (example uses 18081)
154docker run --rm -p 18081:8081 -e NGIT_BIND_ADDRESS=0.0.0.0:8081 ghcr.io/danconwaydev/ngit-relay:latest 154docker run --rm -p 18081:8081 ghcr.io/danconwaydev/ngit-relay:latest
155 155
156# In another terminal, run tests with RELAY_URL 156# In another terminal, run tests with RELAY_URL
157RELAY_URL="ws://localhost:18081" cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture 157grasp-audit audit --relay ws://localhost:18081 --mode ci
158```
159
160**Note:** ngit-relay only accepts Git-related events (NIP-34). Some NIP-01 smoke tests will fail (expected). Validation tests should pass.
161
162### Testing Against General-Purpose Relays
163
164For full NIP-01 smoke test coverage (all 6 tests passing), test against a general-purpose relay:
165 158
166```bash 159# or specific test via cargo
167# Start nostr-rs-relay (accepts all event kinds) 160RELAY_URL="ws://localhost:18081" cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture
168docker run --rm -d --name nostr-test-relay -p 7000:8080 scsibug/nostr-rs-relay
169
170# Run tests (all should pass)
171cargo test --lib -- --ignored --nocapture
172
173# Cleanup
174docker stop nostr-test-relay
175``` 161```
176 162
177Expected: 6/6 tests passed (100%)
178
179## Architecture 163## Architecture
180 164
181``` 165```