diff options
Diffstat (limited to 'grasp-audit/src/bin')
| -rw-r--r-- | grasp-audit/src/bin/grasp-audit.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/grasp-audit/src/bin/grasp-audit.rs b/grasp-audit/src/bin/grasp-audit.rs index 48c1580..0d88bce 100644 --- a/grasp-audit/src/bin/grasp-audit.rs +++ b/grasp-audit/src/bin/grasp-audit.rs | |||
| @@ -20,8 +20,11 @@ enum Commands { | |||
| 20 | #[arg(short, long)] | 20 | #[arg(short, long)] |
| 21 | relay: String, | 21 | relay: String, |
| 22 | 22 | ||
| 23 | /// Mode: ci or production | 23 | /// Fixture mode: shared (default) or isolated |
| 24 | #[arg(short, long, default_value = "ci")] | 24 | /// |
| 25 | /// - shared: Fixtures are cached and reused across tests (efficient for sequential test runs) | ||
| 26 | /// - isolated: Each test creates fresh fixtures (for parallel tests like cargo test) | ||
| 27 | #[arg(short, long, default_value = "shared")] | ||
| 25 | mode: String, | 28 | mode: String, |
| 26 | 29 | ||
| 27 | /// Spec to test (nip01-smoke, nip11, event-acceptance, cors, git-clone, push-auth, repo-creation, all) | 30 | /// Spec to test (nip01-smoke, nip11, event-acceptance, cors, git-clone, push-auth, repo-creation, all) |
| @@ -53,10 +56,14 @@ async fn main() -> Result<()> { | |||
| 53 | spec, | 56 | spec, |
| 54 | git_data_dir, | 57 | git_data_dir, |
| 55 | } => { | 58 | } => { |
| 59 | #[allow(deprecated)] | ||
| 56 | let mut config = match mode.as_str() { | 60 | let mut config = match mode.as_str() { |
| 61 | "shared" => AuditConfig::shared(), | ||
| 62 | "isolated" => AuditConfig::isolated(), | ||
| 63 | // Backwards compatibility aliases | ||
| 57 | "ci" => AuditConfig::ci(), | 64 | "ci" => AuditConfig::ci(), |
| 58 | "production" => AuditConfig::production(), | 65 | "production" => AuditConfig::production(), |
| 59 | _ => return Err(anyhow!("Invalid mode: {}. Use 'ci' or 'production'", mode)), | 66 | _ => return Err(anyhow!("Invalid mode: {}. Use 'shared' or 'isolated'", mode)), |
| 60 | }; | 67 | }; |
| 61 | 68 | ||
| 62 | // Audit needs to create events to test the relay, so disable read-only mode | 69 | // Audit needs to create events to test the relay, so disable read-only mode |