diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-05 12:46:02 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-05 12:46:02 +0000 |
| commit | 94bf5c39af0d8d0a9a15db240d5d46383ec22160 (patch) | |
| tree | 08f92f780d066c80d271694bfc16bbfcc0dc1bae /grasp-audit | |
| parent | 6b78ed707a69e22e5fadd5bd0999c16a0931bbaa (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 'grasp-audit')
| -rw-r--r-- | grasp-audit/README.md | 5 | ||||
| -rwxr-xr-x | grasp-audit/test-ngit-relay.sh | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/grasp-audit/README.md b/grasp-audit/README.md index 97a6429..b1dcb15 100644 --- a/grasp-audit/README.md +++ b/grasp-audit/README.md | |||
| @@ -178,7 +178,10 @@ docker run --rm -p 18081:8081 ghcr.io/danconwaydev/ngit-relay:latest | |||
| 178 | # In another terminal, run tests with RELAY_URL | 178 | # In another terminal, run tests with RELAY_URL |
| 179 | grasp-audit audit --relay ws://localhost:18081 --mode ci | 179 | grasp-audit audit --relay ws://localhost:18081 --mode ci |
| 180 | 180 | ||
| 181 | # or specific test via cargo | 181 | # or run all ignored tests via cargo |
| 182 | RELAY_URL="ws://localhost:18081" cargo test --lib -- --ignored --nocapture | ||
| 183 | |||
| 184 | # or run specific test via cargo | ||
| 182 | RELAY_URL="ws://localhost:18081" cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture | 185 | RELAY_URL="ws://localhost:18081" cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture |
| 183 | ``` | 186 | ``` |
| 184 | 187 | ||
diff --git a/grasp-audit/test-ngit-relay.sh b/grasp-audit/test-ngit-relay.sh index bd4b155..ff6ac1a 100755 --- a/grasp-audit/test-ngit-relay.sh +++ b/grasp-audit/test-ngit-relay.sh | |||
| @@ -195,12 +195,13 @@ elif [ "$MODE" = "test" ]; then | |||
| 195 | # Run cargo test suite | 195 | # Run cargo test suite |
| 196 | # - RELAY_URL: Environment variable tests use to connect | 196 | # - RELAY_URL: Environment variable tests use to connect |
| 197 | # - --lib: Only library tests (not integration tests in tests/) | 197 | # - --lib: Only library tests (not integration tests in tests/) |
| 198 | # - test_grasp01_nostr_relay_against_relay: Specific test module | ||
| 199 | # - --ignored: Run tests marked with #[ignore] (these need relay) | 198 | # - --ignored: Run tests marked with #[ignore] (these need relay) |
| 200 | # - --nocapture: Show println! output from tests | 199 | # - --nocapture: Show println! output from tests |
| 200 | # This runs all library tests marked with #[ignore], including: | ||
| 201 | # - test_grasp01_nostr_relay_against_relay (GRASP-01 relay tests) | ||
| 202 | # - Any other integration tests requiring a relay | ||
| 201 | RELAY_URL="ws://localhost:$PORT" cargo test \ | 203 | RELAY_URL="ws://localhost:$PORT" cargo test \ |
| 202 | --lib test_grasp01_nostr_relay_against_relay \ | 204 | --lib -- --ignored --nocapture || { |
| 203 | -- --ignored --nocapture || { | ||
| 204 | echo "⚠️ Some tests failed" | 205 | echo "⚠️ Some tests failed" |
| 205 | echo " Review output above for details" | 206 | echo " Review output above for details" |
| 206 | } | 207 | } |