diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-12 14:09:26 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-12 14:09:26 +0000 |
| commit | 5148479d76f0958e4a1989a6225a4690292b428f (patch) | |
| tree | 1af972d49be57c8097cb189f87d9c862ebb0b373 /grasp-audit/src/specs/grasp01/mod.rs | |
| parent | 817ce37a5ee8d6279a44cf8cce3cc6a1e4bab576 (diff) | |
feat(grasp-audit): add filter capability compliance tests
Add comprehensive GRASP-01 compliance tests for uploadpack.allowFilter
capability to the grasp-audit test suite. These tests can be run against
ANY GRASP implementation (ngit-relay, ngit-grasp, or others) to verify
filter support.
New test module: grasp-audit/src/specs/grasp01/git_filter.rs
Tests added:
- test_filter_capability_advertised: Verifies filter appears in info/refs
- test_filtered_clone_succeeds: Tests git clone --filter=blob:none
- test_filtered_fetch_succeeds: Tests git fetch --filter=tree:0
Usage:
cd grasp-audit && nix develop -c bash test-ngit-relay.sh --mode test
cd grasp-audit && nix develop -c cargo run -- audit -r ws://localhost:8080 -s git-filter
Diffstat (limited to 'grasp-audit/src/specs/grasp01/mod.rs')
| -rw-r--r-- | grasp-audit/src/specs/grasp01/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/grasp-audit/src/specs/grasp01/mod.rs b/grasp-audit/src/specs/grasp01/mod.rs index fa05f35..0a819ee 100644 --- a/grasp-audit/src/specs/grasp01/mod.rs +++ b/grasp-audit/src/specs/grasp01/mod.rs | |||
| @@ -9,12 +9,14 @@ | |||
| 9 | //! - [`EventAcceptancePolicyTests`] - Event acceptance rules (WebSocket-only) | 9 | //! - [`EventAcceptancePolicyTests`] - Event acceptance rules (WebSocket-only) |
| 10 | //! - [`CorsTests`] - CORS headers on Git HTTP endpoints (requires git-data-dir) | 10 | //! - [`CorsTests`] - CORS headers on Git HTTP endpoints (requires git-data-dir) |
| 11 | //! - [`GitCloneTests`] - Git clone operations (requires git-data-dir) | 11 | //! - [`GitCloneTests`] - Git clone operations (requires git-data-dir) |
| 12 | //! - [`GitFilterTests`] - Git filter capability for partial clone (requires git-data-dir) | ||
| 12 | //! - [`PushAuthorizationTests`] - Push authorization (requires git-data-dir) | 13 | //! - [`PushAuthorizationTests`] - Push authorization (requires git-data-dir) |
| 13 | //! - [`RepositoryCreationTests`] - Repository creation (requires git-data-dir) | 14 | //! - [`RepositoryCreationTests`] - Repository creation (requires git-data-dir) |
| 14 | 15 | ||
| 15 | pub mod cors; | 16 | pub mod cors; |
| 16 | pub mod event_acceptance_policy; | 17 | pub mod event_acceptance_policy; |
| 17 | pub mod git_clone; | 18 | pub mod git_clone; |
| 19 | pub mod git_filter; | ||
| 18 | pub mod nip01_smoke; | 20 | pub mod nip01_smoke; |
| 19 | pub mod nip11_document; | 21 | pub mod nip11_document; |
| 20 | pub mod push_authorization; | 22 | pub mod push_authorization; |
| @@ -24,6 +26,7 @@ pub mod spec_requirements; | |||
| 24 | pub use cors::CorsTests; | 26 | pub use cors::CorsTests; |
| 25 | pub use event_acceptance_policy::EventAcceptancePolicyTests; | 27 | pub use event_acceptance_policy::EventAcceptancePolicyTests; |
| 26 | pub use git_clone::GitCloneTests; | 28 | pub use git_clone::GitCloneTests; |
| 29 | pub use git_filter::GitFilterTests; | ||
| 27 | pub use nip01_smoke::Nip01SmokeTests; | 30 | pub use nip01_smoke::Nip01SmokeTests; |
| 28 | pub use nip11_document::Nip11DocumentTests; | 31 | pub use nip11_document::Nip11DocumentTests; |
| 29 | pub use push_authorization::PushAuthorizationTests; | 32 | pub use push_authorization::PushAuthorizationTests; |