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>2026-02-13 12:07:37 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-02-13 12:31:49 +0000
commita2a99d5a4137b57e4141cf2840f2f51b38035cfa (patch)
tree89d82c7136a2a1f06e68af4c79f89926f2ae3ec2 /grasp-audit/src/specs/grasp01/nip01_smoke.rs
parentd6b955104f4a04dcbe7324e9a861642f4654894f (diff)
fix: use ValidRepoServed for events that tag repo events
PR events, issues, and comments need a queryable repo announcement to reference. Changed PREvent and PREventGenerated fixtures and related tests to depend on ValidRepoServed instead of ValidRepoSent. This ensures tests will fail correctly when announcement purgatory is implemented - events tagging a repo should require that repo to be served (not in purgatory).
Diffstat (limited to 'grasp-audit/src/specs/grasp01/nip01_smoke.rs')
-rw-r--r--grasp-audit/src/specs/grasp01/nip01_smoke.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/grasp-audit/src/specs/grasp01/nip01_smoke.rs b/grasp-audit/src/specs/grasp01/nip01_smoke.rs
index 8cb4166..e3206fc 100644
--- a/grasp-audit/src/specs/grasp01/nip01_smoke.rs
+++ b/grasp-audit/src/specs/grasp01/nip01_smoke.rs
@@ -66,12 +66,12 @@ impl Nip01SmokeTests {
66 "MUST accept valid EVENT messages", 66 "MUST accept valid EVENT messages",
67 ) 67 )
68 .run(|| async { 68 .run(|| async {
69 // Step 1: GENERATE - Create TestContext and get ValidRepo fixture 69 // Step 1: GENERATE - Create TestContext and get ValidRepoServed fixture
70 let ctx = TestContext::new(client); 70 let ctx = TestContext::new(client);
71 let event = ctx 71 let event = ctx
72 .get_fixture(FixtureKind::ValidRepoSent) 72 .get_fixture(FixtureKind::ValidRepoServed)
73 .await 73 .await
74 .map_err(|e| format!("Failed to create ValidRepo fixture: {}", e))?; 74 .map_err(|e| format!("Failed to create ValidRepoServed fixture: {}", e))?;
75 75
76 let event_id = event.id; 76 let event_id = event.id;
77 77
@@ -122,7 +122,7 @@ impl Nip01SmokeTests {
122 /// 122 ///
123 /// ## Fixture-First Pattern 123 /// ## Fixture-First Pattern
124 /// 124 ///
125 /// 1. **Generate**: Create TestContext and get ValidRepo fixture 125 /// 1. **Generate**: Create TestContext and get ValidRepoServed fixture
126 /// 2. **Send**: Fixture already sends the event to relay 126 /// 2. **Send**: Fixture already sends the event to relay
127 /// 3. **Verify**: Subscribe and verify we receive the event 127 /// 3. **Verify**: Subscribe and verify we receive the event
128 pub async fn test_create_subscription(client: &AuditClient) -> TestResult { 128 pub async fn test_create_subscription(client: &AuditClient) -> TestResult {
@@ -132,12 +132,12 @@ impl Nip01SmokeTests {
132 "MUST support REQ subscriptions", 132 "MUST support REQ subscriptions",
133 ) 133 )
134 .run(|| async { 134 .run(|| async {
135 // Step 1: GENERATE - Create TestContext and get ValidRepo fixture 135 // Step 1: GENERATE - Create TestContext and get ValidRepoServed fixture
136 let ctx = TestContext::new(client); 136 let ctx = TestContext::new(client);
137 let _event = ctx 137 let _event = ctx
138 .get_fixture(FixtureKind::ValidRepoSent) 138 .get_fixture(FixtureKind::ValidRepoServed)
139 .await 139 .await
140 .map_err(|e| format!("Failed to create ValidRepo fixture: {}", e))?; 140 .map_err(|e| format!("Failed to create ValidRepoServed fixture: {}", e))?;
141 141
142 // Step 2: VERIFY - Subscribe to NIP-34 announcements from this author 142 // Step 2: VERIFY - Subscribe to NIP-34 announcements from this author
143 let filter = Filter::new() 143 let filter = Filter::new()