upleb.uk

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

summaryrefslogtreecommitdiff
path: root/AGENTS.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-11-05 12:46:02 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-11-05 12:46:02 +0000
commit94bf5c39af0d8d0a9a15db240d5d46383ec22160 (patch)
tree08f92f780d066c80d271694bfc16bbfcc0dc1bae /AGENTS.md
parent6b78ed707a69e22e5fadd5bd0999c16a0931bbaa (diff)
Fix cargo test invocation in test-ngit-relay.sh and documentation
- Changed from 'cargo test --lib test_grasp01_nostr_relay_against_relay' to 'cargo test --lib -- --ignored --nocapture' - This correctly runs ALL library tests marked with #[ignore], not just GRASP-01 - Updated AGENTS.md and grasp-audit/README.md with correct commands - Added examples showing both 'run all ignored tests' and 'run specific test' patterns
Diffstat (limited to 'AGENTS.md')
-rw-r--r--AGENTS.md13
1 files changed, 11 insertions, 2 deletions
diff --git a/AGENTS.md b/AGENTS.md
index d00d7fb..4e33b2a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -37,6 +37,10 @@ nix-shell --run "cargo build"
37docker run --rm -p 18081:8081 ghcr.io/danconwaydev/ngit-relay:latest 37docker run --rm -p 18081:8081 ghcr.io/danconwaydev/ngit-relay:latest
38 38
39# From grasp-audit directory, set RELAY_URL to match your port 39# From grasp-audit directory, set RELAY_URL to match your port
40# Run all ignored tests (includes GRASP-01 and other relay-dependent tests)
41RELAY_URL="ws://localhost:18081" nix develop -c cargo test --lib -- --ignored --nocapture
42
43# Or run a specific test
40RELAY_URL="ws://localhost:18081" nix develop -c cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture 44RELAY_URL="ws://localhost:18081" nix develop -c cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture
41``` 45```
42 46
@@ -89,12 +93,16 @@ nix develop -c cargo test --lib specific_test_name -- --nocapture
89To verify GRASP-01 compliance tests are working correctly: 93To verify GRASP-01 compliance tests are working correctly:
90 94
91```bash 95```bash
96# Run all ignored library tests (includes GRASP-01)
97cd grasp-audit && RELAY_URL="ws://localhost:18081" nix develop -c cargo test --lib -- --ignored --nocapture 2>&1 | tail -60
98
99# Or run specific GRASP-01 test
92cd grasp-audit && RELAY_URL="ws://localhost:18081" nix develop -c cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture 2>&1 | tail -60 100cd grasp-audit && RELAY_URL="ws://localhost:18081" nix develop -c cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture 2>&1 | tail -60
93``` 101```
94 102
95**Expected Output:** 103**Expected Output:**
96- 2-3 tests passing 104- 2-3 tests passing
97- 15 tests showing "Not implemented yet" 105- 15+ tests showing "Not implemented yet"
98 106
99### Troubleshooting 107### Troubleshooting
100 108
@@ -194,7 +202,8 @@ cd grasp-audit && nix develop -c cargo build
194 202
195# Manual relay testing (if needed) 203# Manual relay testing (if needed)
196# 1. Start relay: docker run --rm -p 18081:8081 ghcr.io/danconwaydev/ngit-relay:latest 204# 1. Start relay: docker run --rm -p 18081:8081 ghcr.io/danconwaydev/ngit-relay:latest
197# 2. Run tests: RELAY_URL="ws://localhost:18081" nix develop -c cargo test --ignored 205# 2. Run all ignored tests: RELAY_URL="ws://localhost:18081" nix develop -c cargo test --lib -- --ignored --nocapture
206# 3. Or specific test: RELAY_URL="ws://localhost:18081" nix develop -c cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture
198 207
199# Run single test 208# Run single test
200cd grasp-audit && nix develop -c cargo test --lib test_name -- --nocapture 209cd grasp-audit && nix develop -c cargo test --lib test_name -- --nocapture