From b5bc16daa7e70e6c8a3576be38a8beb564294804 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 5 Nov 2025 07:35:29 +0000 Subject: 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 --- grasp-audit/test-ngit-relay.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)." echo "Some NIP-01 smoke tests will fail (expected behavior)." echo "Validation tests should pass." echo "" -RELAY_URL="ws://localhost:$PORT" cargo test --lib -- --ignored --nocapture + +# Run the CLI tool (cleanup happens via trap even on failure) +cargo run -- audit --relay "ws://localhost:$PORT" --mode ci --spec nip01-smoke || { + echo "⚠️ Some tests failed (expected for ngit-relay)" + echo " Validation tests should have passed" +} echo "✅ Done!" -- cgit v1.2.3