upleb.uk

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

summaryrefslogtreecommitdiff
path: root/grasp-audit/src/specs/grasp01/push_authorization.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/push_authorization.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/push_authorization.rs')
-rw-r--r--grasp-audit/src/specs/grasp01/push_authorization.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/grasp-audit/src/specs/grasp01/push_authorization.rs b/grasp-audit/src/specs/grasp01/push_authorization.rs
index dc78b49..768e8f9 100644
--- a/grasp-audit/src/specs/grasp01/push_authorization.rs
+++ b/grasp-audit/src/specs/grasp01/push_authorization.rs
@@ -208,7 +208,7 @@ async fn setup_pr_test_repo(
208) -> Result<(PathBuf, String, String, String), String> { 208) -> Result<(PathBuf, String, String, String), String> {
209 // Get fixtures 209 // Get fixtures
210 let repo_event = ctx 210 let repo_event = ctx
211 .get_fixture(FixtureKind::ValidRepoSent) 211 .get_fixture(FixtureKind::ValidRepoServed)
212 .await 212 .await
213 .map_err(|e| format!("Failed to get repo announcement: {}", e))?; 213 .map_err(|e| format!("Failed to get repo announcement: {}", e))?;
214 214
@@ -1110,7 +1110,7 @@ impl PushAuthorizationTests {
1110 let pr_event_id = pr_event.id.to_hex(); 1110 let pr_event_id = pr_event.id.to_hex();
1111 1111
1112 // Get repo info for cloning (fresh clone for verification) 1112 // Get repo info for cloning (fresh clone for verification)
1113 let repo = match ctx.get_fixture(FixtureKind::ValidRepoSent).await { 1113 let repo = match ctx.get_fixture(FixtureKind::ValidRepoServed).await {
1114 Ok(r) => r, 1114 Ok(r) => r,
1115 Err(e) => { 1115 Err(e) => {
1116 return TestResult::new(test_name, SpecRef::GitAcceptRefsNostrEventId, desc) 1116 return TestResult::new(test_name, SpecRef::GitAcceptRefsNostrEventId, desc)
@@ -1198,7 +1198,7 @@ impl PushAuthorizationTests {
1198 let pr_event_id = pr_event.id.to_hex(); 1198 let pr_event_id = pr_event.id.to_hex();
1199 1199
1200 // Get repo info for cloning (fresh clone for this test) 1200 // Get repo info for cloning (fresh clone for this test)
1201 let repo = match ctx.get_fixture(FixtureKind::ValidRepoSent).await { 1201 let repo = match ctx.get_fixture(FixtureKind::ValidRepoServed).await {
1202 Ok(r) => r, 1202 Ok(r) => r,
1203 Err(e) => { 1203 Err(e) => {
1204 return TestResult::new(test_name, SpecRef::GitAcceptRefsNostrEventId, desc) 1204 return TestResult::new(test_name, SpecRef::GitAcceptRefsNostrEventId, desc)
@@ -1289,7 +1289,7 @@ impl PushAuthorizationTests {
1289 let pr_event_id = pr_event.id.to_hex(); 1289 let pr_event_id = pr_event.id.to_hex();
1290 1290
1291 // Get repo info for cloning (fresh clone for this test) 1291 // Get repo info for cloning (fresh clone for this test)
1292 let repo = match ctx.get_fixture(FixtureKind::ValidRepoSent).await { 1292 let repo = match ctx.get_fixture(FixtureKind::ValidRepoServed).await {
1293 Ok(r) => r, 1293 Ok(r) => r,
1294 Err(e) => { 1294 Err(e) => {
1295 return TestResult::new(test_name, SpecRef::GitAcceptRefsNostrEventId, desc) 1295 return TestResult::new(test_name, SpecRef::GitAcceptRefsNostrEventId, desc)