diff options
| -rw-r--r-- | grasp-audit/src/specs/grasp01/push_authorization.rs | 34 | ||||
| -rw-r--r-- | tests/push_authorization.rs | 5 |
2 files changed, 39 insertions, 0 deletions
diff --git a/grasp-audit/src/specs/grasp01/push_authorization.rs b/grasp-audit/src/specs/grasp01/push_authorization.rs index 64ce8f9..0ba5b5d 100644 --- a/grasp-audit/src/specs/grasp01/push_authorization.rs +++ b/grasp-audit/src/specs/grasp01/push_authorization.rs | |||
| @@ -355,6 +355,8 @@ impl PushAuthorizationTests { | |||
| 355 | results.add( | 355 | results.add( |
| 356 | Self::test_push_authorized_by_recursive_maintainer_state(client, relay_domain).await, | 356 | Self::test_push_authorized_by_recursive_maintainer_state(client, relay_domain).await, |
| 357 | ); | 357 | ); |
| 358 | // Note: test_push_of_state_by_maintainer_updates_other_maintainer_repos is not included | ||
| 359 | // in run_tests as it's a stub for the purgatory feature and returns .skip() | ||
| 358 | results.add( | 360 | results.add( |
| 359 | Self::test_push_to_nostr_ref_with_invalid_event_id_rejected(client, relay_domain).await, | 361 | Self::test_push_to_nostr_ref_with_invalid_event_id_rejected(client, relay_domain).await, |
| 360 | ); | 362 | ); |
| @@ -758,6 +760,38 @@ impl PushAuthorizationTests { | |||
| 758 | } | 760 | } |
| 759 | } | 761 | } |
| 760 | 762 | ||
| 763 | /// Test that push of state by one maintainer updates git repos of other maintainers | ||
| 764 | /// | ||
| 765 | /// GRASP-01: "respecting the recursive maintainer set" | ||
| 766 | /// | ||
| 767 | /// This test verifies that when a maintainer publishes a state event, it updates | ||
| 768 | /// the git repository state for all other maintainers' views. This ensures git | ||
| 769 | /// repositories always reflect the state according to nostr events (including state | ||
| 770 | /// from recursive maintainers). | ||
| 771 | /// | ||
| 772 | /// ## Implementation Note | ||
| 773 | /// | ||
| 774 | /// This test is a stub for the purgatory feature. It will be implemented as part | ||
| 775 | /// of GRASP-02 purgatory functionality. | ||
| 776 | /// | ||
| 777 | /// ## Fixture Compatibility | ||
| 778 | /// | ||
| 779 | /// This test will use: | ||
| 780 | /// - `MaintainerStateDataPushed` - maintainer's state event with git data pushed | ||
| 781 | /// - Multiple maintainer clones to verify state propagation | ||
| 782 | #[allow(dead_code)] | ||
| 783 | pub async fn test_push_of_state_by_maintainer_updates_other_maintainer_repos( | ||
| 784 | _client: &AuditClient, | ||
| 785 | _relay_domain: &str, | ||
| 786 | ) -> TestResult { | ||
| 787 | TestResult::new( | ||
| 788 | "test_push_of_state_by_maintainer_updates_other_maintainer_repos", | ||
| 789 | "GRASP-01:git-http:purgatory", | ||
| 790 | "Maintainer state updates propagate to other maintainer repos", | ||
| 791 | ) | ||
| 792 | .fail("Not yet implemented - requires purgatory feature (GRASP-02)") | ||
| 793 | } | ||
| 794 | |||
| 761 | /// Test that non-maintainer state event is ignored | 795 | /// Test that non-maintainer state event is ignored |
| 762 | /// | 796 | /// |
| 763 | /// GRASP-01: "respecting the recursive maintainer set" | 797 | /// GRASP-01: "respecting the recursive maintainer set" |
diff --git a/tests/push_authorization.rs b/tests/push_authorization.rs index df291d5..221c4f4 100644 --- a/tests/push_authorization.rs +++ b/tests/push_authorization.rs | |||
| @@ -70,3 +70,8 @@ isolated_push_test!(test_push_to_nostr_ref_with_wrong_commit_after_event_receive | |||
| 70 | isolated_push_test!(test_push_to_nostr_ref_with_correct_commit_after_event_received_accepted); | 70 | isolated_push_test!(test_push_to_nostr_ref_with_correct_commit_after_event_received_accepted); |
| 71 | isolated_push_test!(test_head_set_after_state_event_with_existing_commit); | 71 | isolated_push_test!(test_head_set_after_state_event_with_existing_commit); |
| 72 | isolated_push_test!(test_head_set_after_git_push_with_required_oids); | 72 | isolated_push_test!(test_head_set_after_git_push_with_required_oids); |
| 73 | |||
| 74 | // Note: test_push_of_state_by_maintainer_updates_other_maintainer_repos is not included | ||
| 75 | // as it's a stub for the purgatory feature. It can be run manually once implemented: | ||
| 76 | // isolated_push_test!(test_push_of_state_by_maintainer_updates_other_maintainer_repos); | ||
| 77 | |||