upleb.uk

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

summaryrefslogtreecommitdiff
path: root/grasp-audit/src/specs/grasp01/nip01_smoke.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-01 14:31:32 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-01 15:22:38 +0000
commitd2ac69816567f092fe0d4661723bc43778cb481b (patch)
treee8b51b61a6a7b0ab1a214adebe4e237143b01f0b /grasp-audit/src/specs/grasp01/nip01_smoke.rs
parent7a78815e29b01c83f3d0ec195ba717a2eba8cd37 (diff)
fix cargo clippy and fmt warnings
Diffstat (limited to 'grasp-audit/src/specs/grasp01/nip01_smoke.rs')
-rw-r--r--grasp-audit/src/specs/grasp01/nip01_smoke.rs32
1 files changed, 14 insertions, 18 deletions
diff --git a/grasp-audit/src/specs/grasp01/nip01_smoke.rs b/grasp-audit/src/specs/grasp01/nip01_smoke.rs
index b16d61a..5161da8 100644
--- a/grasp-audit/src/specs/grasp01/nip01_smoke.rs
+++ b/grasp-audit/src/specs/grasp01/nip01_smoke.rs
@@ -163,27 +163,23 @@ impl Nip01SmokeTests {
163 /// Spec: NIP-01 CLOSE message 163 /// Spec: NIP-01 CLOSE message
164 /// Requirement: Relay MUST support CLOSE to end subscriptions 164 /// Requirement: Relay MUST support CLOSE to end subscriptions
165 pub async fn test_close_subscription(client: &AuditClient) -> TestResult { 165 pub async fn test_close_subscription(client: &AuditClient) -> TestResult {
166 TestResult::new( 166 TestResult::new("close_subscription", "NIP-01", "Can close subscriptions")
167 "close_subscription", 167 .run(|| async {
168 "NIP-01", 168 // For now, we just verify we can query events
169 "Can close subscriptions", 169 // Full subscription management with CLOSE would require
170 ) 170 // lower-level WebSocket access
171 .run(|| async {
172 // For now, we just verify we can query events
173 // Full subscription management with CLOSE would require
174 // lower-level WebSocket access
175 171
176 let filter = Filter::new().kind(Kind::TextNote).limit(1); 172 let filter = Filter::new().kind(Kind::TextNote).limit(1);
177 173
178 let _events = client 174 let _events = client
179 .subscribe(vec![filter], Some(std::time::Duration::from_secs(2))) 175 .subscribe(vec![filter], Some(std::time::Duration::from_secs(2)))
180 .await 176 .await
181 .map_err(|e| format!("Failed to subscribe: {}", e))?; 177 .map_err(|e| format!("Failed to subscribe: {}", e))?;
182 178
183 // If we got here, subscription worked 179 // If we got here, subscription worked
184 Ok(()) 180 Ok(())
185 }) 181 })
186 .await 182 .await
187 } 183 }
188 184
189 /// Test 5: Rejects events with invalid signatures 185 /// Test 5: Rejects events with invalid signatures