diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-05 07:35:29 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-05 07:35:29 +0000 |
| commit | b5bc16daa7e70e6c8a3576be38a8beb564294804 (patch) | |
| tree | a52832774eae7765f3426b5ab1b0a446c7b642f4 /grasp-audit/test-ngit-relay.sh | |
| parent | 81d611004917afffe5af01925eee7e7695c54b3d (diff) | |
test: use CLI tool in test script, ensure cleanup on errors
- Replace 'cargo test' with 'cargo run -- audit' CLI command
- Cleanup still happens via trap even when tests fail
- Add helpful message about expected failures for ngit-relay
Diffstat (limited to 'grasp-audit/test-ngit-relay.sh')
| -rwxr-xr-x | grasp-audit/test-ngit-relay.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/grasp-audit/test-ngit-relay.sh b/grasp-audit/test-ngit-relay.sh index 5e94fdb..2d1d7f2 100755 --- a/grasp-audit/test-ngit-relay.sh +++ b/grasp-audit/test-ngit-relay.sh | |||
| @@ -57,6 +57,11 @@ echo "Note: ngit-relay only accepts Git-related events (NIP-34)." | |||
| 57 | echo "Some NIP-01 smoke tests will fail (expected behavior)." | 57 | echo "Some NIP-01 smoke tests will fail (expected behavior)." |
| 58 | echo "Validation tests should pass." | 58 | echo "Validation tests should pass." |
| 59 | echo "" | 59 | echo "" |
| 60 | RELAY_URL="ws://localhost:$PORT" cargo test --lib -- --ignored --nocapture | 60 | |
| 61 | # Run the CLI tool (cleanup happens via trap even on failure) | ||
| 62 | cargo run -- audit --relay "ws://localhost:$PORT" --mode ci --spec nip01-smoke || { | ||
| 63 | echo "⚠️ Some tests failed (expected for ngit-relay)" | ||
| 64 | echo " Validation tests should have passed" | ||
| 65 | } | ||
| 61 | 66 | ||
| 62 | echo "✅ Done!" | 67 | echo "✅ Done!" |