diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-01 14:31:32 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-01 15:22:38 +0000 |
| commit | d2ac69816567f092fe0d4661723bc43778cb481b (patch) | |
| tree | e8b51b61a6a7b0ab1a214adebe4e237143b01f0b /grasp-audit/src/bin | |
| parent | 7a78815e29b01c83f3d0ec195ba717a2eba8cd37 (diff) | |
fix cargo clippy and fmt warnings
Diffstat (limited to 'grasp-audit/src/bin')
| -rw-r--r-- | grasp-audit/src/bin/grasp-audit.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/grasp-audit/src/bin/grasp-audit.rs b/grasp-audit/src/bin/grasp-audit.rs index 2aabefe..48c1580 100644 --- a/grasp-audit/src/bin/grasp-audit.rs +++ b/grasp-audit/src/bin/grasp-audit.rs | |||
| @@ -47,14 +47,18 @@ async fn main() -> Result<()> { | |||
| 47 | let cli = Cli::parse(); | 47 | let cli = Cli::parse(); |
| 48 | 48 | ||
| 49 | match cli.command { | 49 | match cli.command { |
| 50 | Commands::Audit { relay, mode, spec, git_data_dir } => { | 50 | Commands::Audit { |
| 51 | 51 | relay, | |
| 52 | mode, | ||
| 53 | spec, | ||
| 54 | git_data_dir, | ||
| 55 | } => { | ||
| 52 | let mut config = match mode.as_str() { | 56 | let mut config = match mode.as_str() { |
| 53 | "ci" => AuditConfig::ci(), | 57 | "ci" => AuditConfig::ci(), |
| 54 | "production" => AuditConfig::production(), | 58 | "production" => AuditConfig::production(), |
| 55 | _ => return Err(anyhow!("Invalid mode: {}. Use 'ci' or 'production'", mode)), | 59 | _ => return Err(anyhow!("Invalid mode: {}. Use 'ci' or 'production'", mode)), |
| 56 | }; | 60 | }; |
| 57 | 61 | ||
| 58 | // Audit needs to create events to test the relay, so disable read-only mode | 62 | // Audit needs to create events to test the relay, so disable read-only mode |
| 59 | config.read_only = false; | 63 | config.read_only = false; |
| 60 | 64 | ||
| @@ -145,17 +149,17 @@ async fn main() -> Result<()> { | |||
| 145 | println!(" → NIP-01 smoke tests..."); | 149 | println!(" → NIP-01 smoke tests..."); |
| 146 | let nip01_results = specs::Nip01SmokeTests::run_all(&client).await; | 150 | let nip01_results = specs::Nip01SmokeTests::run_all(&client).await; |
| 147 | all_results.merge(nip01_results); | 151 | all_results.merge(nip01_results); |
| 148 | 152 | ||
| 149 | // NIP-11 document tests | 153 | // NIP-11 document tests |
| 150 | println!(" → NIP-11 document tests..."); | 154 | println!(" → NIP-11 document tests..."); |
| 151 | let nip11_results = specs::Nip11DocumentTests::run_all(&client).await; | 155 | let nip11_results = specs::Nip11DocumentTests::run_all(&client).await; |
| 152 | all_results.merge(nip11_results); | 156 | all_results.merge(nip11_results); |
| 153 | 157 | ||
| 154 | // CORS tests | 158 | // CORS tests |
| 155 | println!(" → CORS tests..."); | 159 | println!(" → CORS tests..."); |
| 156 | let cors_results = specs::CorsTests::run_all(&client, &relay_domain).await; | 160 | let cors_results = specs::CorsTests::run_all(&client, &relay_domain).await; |
| 157 | all_results.merge(cors_results); | 161 | all_results.merge(cors_results); |
| 158 | 162 | ||
| 159 | println!(); | 163 | println!(); |
| 160 | all_results | 164 | all_results |
| 161 | } | 165 | } |