From 2ce9b2831e3af536f31491344abdf4b897f67a69 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 23 Dec 2025 13:55:34 +0000 Subject: audit: updated grasp01 line refs to reflect purgatory insertion --- .../src/specs/grasp01/push_authorization.rs | 168 ++++++++++----------- 1 file changed, 84 insertions(+), 84 deletions(-) (limited to 'grasp-audit/src/specs/grasp01/push_authorization.rs') diff --git a/grasp-audit/src/specs/grasp01/push_authorization.rs b/grasp-audit/src/specs/grasp01/push_authorization.rs index 25738d1..4f21e70 100644 --- a/grasp-audit/src/specs/grasp01/push_authorization.rs +++ b/grasp-audit/src/specs/grasp01/push_authorization.rs @@ -409,7 +409,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected without state event", ) .fail(format!("Failed to create repo: {}", e)) @@ -433,7 +433,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected without state event", ) .fail(&e) @@ -447,7 +447,7 @@ impl PushAuthorizationTests { cleanup(); return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected without state event", ) .fail(&e); @@ -460,19 +460,19 @@ impl PushAuthorizationTests { match push_result { Ok(false) => TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected without state event", ) .pass(), Ok(true) => TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected without state event", ) .fail("Push accepted but should be rejected"), Err(e) => TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected without state event", ) .fail(&e), @@ -504,13 +504,13 @@ impl PushAuthorizationTests { match ctx.get_fixture(FixtureKind::OwnerStateDataPushed).await { Ok(_state_event) => TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push authorized with matching state", ) .pass(), Err(e) => TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push authorized with matching state", ) .fail(format!("{}", e)), @@ -552,7 +552,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected when commit not in state event", ) .fail(format!("Failed to create RepoState fixture: {}", e)); @@ -572,7 +572,7 @@ impl PushAuthorizationTests { None => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected when commit not in state event", ) .fail("Missing repo_id in state event"); @@ -584,7 +584,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected when commit not in state event", ) .fail(format!("Failed to convert pubkey to bech32: {}", e)); @@ -600,7 +600,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected when commit not in state event", ) .fail(format!("Failed to clone repo: {}", e)); @@ -623,7 +623,7 @@ impl PushAuthorizationTests { cleanup(); return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected when commit not in state event", ) .fail(format!("Failed to create/checkout main branch: {}", e)); @@ -632,7 +632,7 @@ impl PushAuthorizationTests { cleanup(); return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected when commit not in state event", ) .fail(format!( @@ -649,7 +649,7 @@ impl PushAuthorizationTests { cleanup(); return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push rejected when commit not in state event", ) .fail(format!("Failed to create wrong commit: {}", e)); @@ -663,10 +663,10 @@ impl PushAuthorizationTests { cleanup(); match push_result { - Ok(false) => TestResult::new(test_name, "GRASP-01:git-http:30", "Push rejected when commit not in state event").pass(), - Ok(true) => TestResult::new(test_name, "GRASP-01:git-http:30", "Push rejected when commit not in state event") + Ok(false) => TestResult::new(test_name, "GRASP-01:git-http:36", "Push rejected when commit not in state event").pass(), + Ok(true) => TestResult::new(test_name, "GRASP-01:git-http:36", "Push rejected when commit not in state event") .fail("Push accepted but should be rejected. The pushed commit is not in the state event."), - Err(e) => TestResult::new(test_name, "GRASP-01:git-http:30", "Push rejected when commit not in state event").fail(&e), + Err(e) => TestResult::new(test_name, "GRASP-01:git-http:36", "Push rejected when commit not in state event").fail(&e), } } @@ -701,13 +701,13 @@ impl PushAuthorizationTests { { Ok(_maintainer_state_event) => TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push authorized by maintainer state event only (no announcement)", ) .pass(), Err(e) => TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push authorized by maintainer state event only (no announcement)", ) .fail(format!("{}", e)), @@ -744,13 +744,13 @@ impl PushAuthorizationTests { { Ok(_recursive_maintainer_state_event) => TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push authorized by recursive maintainer state event", ) .pass(), Err(e) => TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Push authorized by recursive maintainer state event", ) .fail(format!("{}", e)), @@ -794,7 +794,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Non-maintainer state events ignored", ) .fail(format!("Failed to get OwnerStateDataPushed fixture: {}", e)); @@ -812,7 +812,7 @@ impl PushAuthorizationTests { None => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Non-maintainer state events ignored", ) .fail("Missing repo_id in state event"); @@ -824,7 +824,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Non-maintainer state events ignored", ) .fail(format!("Failed to convert pubkey to bech32: {}", e)); @@ -839,7 +839,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Non-maintainer state events ignored", ) .fail(format!("Failed to clone repo: {}", e)); @@ -861,7 +861,7 @@ impl PushAuthorizationTests { cleanup(); return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Non-maintainer state events ignored", ) .fail(format!("Failed to create commit: {}", e)); @@ -887,7 +887,7 @@ impl PushAuthorizationTests { cleanup(); return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Non-maintainer state events ignored", ) .fail(format!("Failed to build rogue state event: {}", e)); @@ -899,7 +899,7 @@ impl PushAuthorizationTests { cleanup(); return TestResult::new( test_name, - "GRASP-01:git-http:30", + "GRASP-01:git-http:36", "Non-maintainer state events ignored", ) .fail(format!("Failed to send rogue state event: {}", e)); @@ -916,8 +916,8 @@ impl PushAuthorizationTests { cleanup(); match push_result { - Ok(false) => TestResult::new(test_name, "GRASP-01:git-http:30", "Non-maintainer state events ignored").pass(), - Ok(true) => TestResult::new(test_name, "GRASP-01:git-http:30", "Non-maintainer state events ignored") + Ok(false) => TestResult::new(test_name, "GRASP-01:git-http:36", "Non-maintainer state events ignored").pass(), + Ok(true) => TestResult::new(test_name, "GRASP-01:git-http:36", "Non-maintainer state events ignored") .fail(format!( "Push accepted but should be rejected. A non-maintainer (pubkey: {}) published \ a state event announcing commit {}, but the push was accepted. The relay should \ @@ -926,7 +926,7 @@ impl PushAuthorizationTests { new_commit, client.public_key() )), - Err(e) => TestResult::new(test_name, "GRASP-01:git-http:30", "Non-maintainer state events ignored").fail(&e), + Err(e) => TestResult::new(test_name, "GRASP-01:git-http:36", "Non-maintainer state events ignored").fail(&e), } } @@ -957,7 +957,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:34", + "GRASP-01:git-http:40", "Push to refs/nostr/ rejected", ) .fail(format!("Failed to create repo: {}", e)); @@ -983,7 +983,7 @@ impl PushAuthorizationTests { Err(e) => { return TestResult::new( test_name, - "GRASP-01:git-http:34", + "GRASP-01:git-http:40", "Push to refs/nostr/ rejected", ) .fail(&e); @@ -998,7 +998,7 @@ impl PushAuthorizationTests { cleanup(); return TestResult::new( test_name, - "GRASP-01:git-http:34", + "GRASP-01:git-http:40", "Push to refs/nostr/ rejected", ) .fail(&e); @@ -1017,13 +1017,13 @@ impl PushAuthorizationTests { match push_result { Ok(false) => TestResult::new( test_name, - "GRASP-01:git-http:34", + "GRASP-01:git-http:40", "Push to refs/nostr/ rejected", ) .pass(), Ok(true) => TestResult::new( test_name, - "GRASP-01:git-http:34", + "GRASP-01:git-http:40", "Push to refs/nostr/ rejected", ) .fail(format!( @@ -1034,7 +1034,7 @@ impl PushAuthorizationTests { )), Err(e) => TestResult::new( test_name, - "GRASP-01:git-http:34", + "GRASP-01:git-http:40", "Push to refs/nostr/ rejected", ) .fail(format!("Push error: {}", e)), @@ -1068,9 +1068,9 @@ impl PushAuthorizationTests { .get_fixture(FixtureKind::PRWrongCommitPushedBeforeEvent) .await { - Ok(_pr_event) => TestResult::new(test_name, "GRASP-01:git-http:34", desc).pass(), + Ok(_pr_event) => TestResult::new(test_name, "GRASP-01:git-http:40", desc).pass(), Err(e) => { - TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(format!("{}", e)) + TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(format!("{}", e)) } } } @@ -1097,7 +1097,7 @@ impl PushAuthorizationTests { { Ok(e) => e, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail(format!("{}", e)); } }; @@ -1108,7 +1108,7 @@ impl PushAuthorizationTests { let repo = match ctx.get_fixture(FixtureKind::ValidRepo).await { Ok(r) => r, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail(format!("{}", e)); } }; @@ -1124,7 +1124,7 @@ impl PushAuthorizationTests { let owner_npub = match repo.pubkey.to_bech32() { Ok(n) => n, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail(format!("Failed to get owner npub: {}", e)); } }; @@ -1133,7 +1133,7 @@ impl PushAuthorizationTests { let clone_path = match clone_repo(relay_domain, &owner_npub, &repo_id) { Ok(p) => p, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(&e); + return TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(&e); } }; @@ -1143,7 +1143,7 @@ impl PushAuthorizationTests { Ok(exists) => exists, Err(e) => { let _ = fs::remove_dir_all(&clone_path); - return TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(&e); + return TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(&e); } }; @@ -1151,13 +1151,13 @@ impl PushAuthorizationTests { // Ref should be deleted since the pushed commit doesn't match the PR event's `c` tag if refs_exist { - TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(format!( + TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(format!( "Expected refs/nostr/{} to be deleted when PR event published with non-matching commit, \ but the ref still exists. The relay should delete refs that don't match the event's `c` tag.", pr_event_id )) } else { - TestResult::new(test_name, "GRASP-01:git-http:34", desc).pass() + TestResult::new(test_name, "GRASP-01:git-http:40", desc).pass() } } @@ -1183,7 +1183,7 @@ impl PushAuthorizationTests { { Ok(e) => e, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail(format!("{}", e)); } }; @@ -1194,7 +1194,7 @@ impl PushAuthorizationTests { let repo = match ctx.get_fixture(FixtureKind::ValidRepo).await { Ok(r) => r, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail(format!("{}", e)); } }; @@ -1210,7 +1210,7 @@ impl PushAuthorizationTests { let owner_npub = match repo.pubkey.to_bech32() { Ok(n) => n, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail(format!("Failed to get owner npub: {}", e)); } }; @@ -1219,7 +1219,7 @@ impl PushAuthorizationTests { let clone_path = match clone_repo(relay_domain, &owner_npub, &repo_id) { Ok(p) => p, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(&e); + return TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(&e); } }; @@ -1227,7 +1227,7 @@ impl PushAuthorizationTests { if let Err(e) = create_deterministic_commit_with_variant(&clone_path, CommitVariant::Owner) { let _ = fs::remove_dir_all(&clone_path); - return TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(&e); + return TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(&e); } // Try to push with wrong commit (should be rejected since PR event exists) @@ -1235,7 +1235,7 @@ impl PushAuthorizationTests { Ok(success) => success, Err(e) => { let _ = fs::remove_dir_all(&clone_path); - return TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(&e); + return TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(&e); } }; @@ -1243,11 +1243,11 @@ impl PushAuthorizationTests { // Should REJECT - PR event exists with different commit hash if push_succeeded { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail("Push accepted (expected rejection due to commit hash mismatch)"); } - TestResult::new(test_name, "GRASP-01:git-http:34", desc).pass() + TestResult::new(test_name, "GRASP-01:git-http:40", desc).pass() } /// Test 4: Push correct commit to refs/nostr/ AFTER PR event exists @@ -1272,7 +1272,7 @@ impl PushAuthorizationTests { { Ok(e) => e, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail(format!("{}", e)); } }; @@ -1283,7 +1283,7 @@ impl PushAuthorizationTests { let repo = match ctx.get_fixture(FixtureKind::ValidRepo).await { Ok(r) => r, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail(format!("{}", e)); } }; @@ -1299,7 +1299,7 @@ impl PushAuthorizationTests { let owner_npub = match repo.pubkey.to_bech32() { Ok(n) => n, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail(format!("Failed to get owner npub: {}", e)); } }; @@ -1308,14 +1308,14 @@ impl PushAuthorizationTests { let clone_path = match clone_repo(relay_domain, &owner_npub, &repo_id) { Ok(p) => p, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(&e); + return TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(&e); } }; // Create the CORRECT PR test commit (the one expected by PR event) if let Err(e) = reset_to_correct_pr_commit(&clone_path) { let _ = fs::remove_dir_all(&clone_path); - return TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(&e); + return TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(&e); } // Push correct commit (should succeed) @@ -1323,7 +1323,7 @@ impl PushAuthorizationTests { Ok(success) => success, Err(e) => { let _ = fs::remove_dir_all(&clone_path); - return TestResult::new(test_name, "GRASP-01:git-http:34", desc).fail(&e); + return TestResult::new(test_name, "GRASP-01:git-http:40", desc).fail(&e); } }; @@ -1331,11 +1331,11 @@ impl PushAuthorizationTests { // Should ACCEPT - commit matches PR event's c tag if !push_succeeded { - return TestResult::new(test_name, "GRASP-01:git-http:34", desc) + return TestResult::new(test_name, "GRASP-01:git-http:40", desc) .fail("Push rejected (expected acceptance since commit matches PR event)"); } - TestResult::new(test_name, "GRASP-01:git-http:34", desc).pass() + TestResult::new(test_name, "GRASP-01:git-http:40", desc).pass() } /// Test that HEAD is set after a state event is published with an existing commit @@ -1372,7 +1372,7 @@ impl PushAuthorizationTests { { Ok(e) => e, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc).fail(format!( + return TestResult::new(test_name, "GRASP-01:git-http:38", desc).fail(format!( "Failed to create HeadSetToDevelopBranch fixture: {}", e )); @@ -1385,7 +1385,7 @@ impl PushAuthorizationTests { let valid_repo = match ctx.get_fixture(FixtureKind::ValidRepo).await { Ok(e) => e, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to get ValidRepo fixture: {}", e)); } }; @@ -1398,7 +1398,7 @@ impl PushAuthorizationTests { { Some(id) => id.to_string(), None => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail("Missing repo_id in ValidRepo"); } }; @@ -1406,7 +1406,7 @@ impl PushAuthorizationTests { let npub = match valid_repo.pubkey.to_bech32() { Ok(n) => n, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to convert pubkey to bech32: {}", e)); } }; @@ -1418,16 +1418,16 @@ impl PushAuthorizationTests { match get_default_branch_from_info_refs(relay_domain, &npub, &repo_id).await { Ok(branch) => branch, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to get default branch: {}", e)); } }; // Verify HEAD points to refs/heads/develop if default_branch == "refs/heads/develop" { - TestResult::new(test_name, "GRASP-01:git-http:32", desc).pass() + TestResult::new(test_name, "GRASP-01:git-http:38", desc).pass() } else { - TestResult::new(test_name, "GRASP-01:git-http:32", desc).fail(format!( + TestResult::new(test_name, "GRASP-01:git-http:38", desc).fail(format!( "Expected HEAD to point to 'refs/heads/develop' but got '{}'. \ GRASP-01 requires: 'MUST set repository HEAD per repository state announcement \ as soon as the git data related to that branch has been received.'", @@ -1476,7 +1476,7 @@ impl PushAuthorizationTests { let _develop_state = match ctx.get_fixture(FixtureKind::HeadSetToDevelopBranch).await { Ok(e) => e, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc).fail(format!( + return TestResult::new(test_name, "GRASP-01:git-http:38", desc).fail(format!( "Failed to create HeadSetToDevelopBranch fixture: {}", e )); @@ -1489,7 +1489,7 @@ impl PushAuthorizationTests { let valid_repo = match ctx.get_fixture(FixtureKind::ValidRepo).await { Ok(e) => e, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to get ValidRepo fixture: {}", e)); } }; @@ -1502,7 +1502,7 @@ impl PushAuthorizationTests { { Some(id) => id.to_string(), None => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail("Missing repo_id in ValidRepo"); } }; @@ -1510,7 +1510,7 @@ impl PushAuthorizationTests { let npub = match valid_repo.pubkey.to_bech32() { Ok(n) => n, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to convert pubkey to bech32: {}", e)); } }; @@ -1521,7 +1521,7 @@ impl PushAuthorizationTests { let clone_path = match clone_repo(relay_domain, &npub, &repo_id) { Ok(path) => path, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to clone repo: {}", e)); } }; @@ -1536,7 +1536,7 @@ impl PushAuthorizationTests { if let Err(e) = output { let _ = fs::remove_dir_all(&clone_path); - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to create develop1 branch: {}", e)); } @@ -1545,7 +1545,7 @@ impl PushAuthorizationTests { Ok(hash) => hash, Err(e) => { let _ = fs::remove_dir_all(&clone_path); - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to create commit: {}", e)); } }; @@ -1570,7 +1570,7 @@ impl PushAuthorizationTests { Ok(e) => e, Err(e) => { let _ = fs::remove_dir_all(&clone_path); - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to build state event: {}", e)); } }; @@ -1578,7 +1578,7 @@ impl PushAuthorizationTests { // Send the state event (commit doesn't exist on relay yet) if let Err(e) = client.send_event(state_event).await { let _ = fs::remove_dir_all(&clone_path); - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to send state event: {}", e)); } @@ -1591,11 +1591,11 @@ impl PushAuthorizationTests { match push_result { Ok(true) => { /* Push succeeded, continue to verify */ } Ok(false) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail("Push to refs/heads/develop1 was rejected"); } Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to push develop1 branch: {}", e)); } } @@ -1608,16 +1608,16 @@ impl PushAuthorizationTests { match get_default_branch_from_info_refs(relay_domain, &npub, &repo_id).await { Ok(branch) => branch, Err(e) => { - return TestResult::new(test_name, "GRASP-01:git-http:32", desc) + return TestResult::new(test_name, "GRASP-01:git-http:38", desc) .fail(format!("Failed to get default branch: {}", e)); } }; // Verify HEAD points to refs/heads/develop1 if default_branch == "refs/heads/develop1" { - TestResult::new(test_name, "GRASP-01:git-http:32", desc).pass() + TestResult::new(test_name, "GRASP-01:git-http:38", desc).pass() } else { - TestResult::new(test_name, "GRASP-01:git-http:32", desc).fail(format!( + TestResult::new(test_name, "GRASP-01:git-http:38", desc).fail(format!( "Expected HEAD to point to 'refs/heads/develop1' but got '{}'. \ GRASP-01 requires: 'MUST set repository HEAD per repository state announcement \ as soon as the git data related to that branch has been received.'", -- cgit v1.2.3