diff options
Diffstat (limited to 'crates/mozart/src/commands/diagnose.rs')
| -rw-r--r-- | crates/mozart/src/commands/diagnose.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/crates/mozart/src/commands/diagnose.rs b/crates/mozart/src/commands/diagnose.rs index 382b8ae..4c8d126 100644 --- a/crates/mozart/src/commands/diagnose.rs +++ b/crates/mozart/src/commands/diagnose.rs @@ -7,8 +7,6 @@ use std::path::{Path, PathBuf}; #[derive(Args)] pub struct DiagnoseArgs {} -// ─── Check result ───────────────────────────────────────────────────────────── - enum CheckResult { /// OK, with optional detail string. Ok(Option<String>), @@ -22,8 +20,6 @@ enum CheckResult { Info(String), } -// ─── Output helpers ─────────────────────────────────────────────────────────── - /// Print "Checking {label}: OK/WARNING/FAIL/SKIP" and ratchet exit_code. /// /// Exit code ratchet: Warning → 1 (if currently 0), Fail → 2 (always overrides 1). @@ -77,8 +73,6 @@ fn print_info_line(result: &CheckResult, console: &Console) { } } -// ─── Individual checks ──────────────────────────────────────────────────────── - /// Check 1: Mozart version info (informational). fn check_version() -> CheckResult { CheckResult::Info(format!("Mozart version {MOZART_VERSION}")) @@ -393,8 +387,6 @@ fn check_cache_dir(cache_dir: &Path) -> CheckResult { } } -// ─── Main execute function ───────────────────────────────────────────────────── - pub async fn execute( _args: &DiagnoseArgs, cli: &super::Cli, @@ -519,16 +511,12 @@ pub async fn execute( Ok(()) } -// ─── Tests ──────────────────────────────────────────────────────────────────── - #[cfg(test)] mod tests { use super::*; use std::fs; use tempfile::tempdir; - // ── test_parse_git_version ──────────────────────────────────────────────── - #[test] fn test_parse_git_version() { assert_eq!(parse_git_version("git version 2.39.1"), Some((2, 39, 1))); @@ -545,8 +533,6 @@ mod tests { assert_eq!(parse_git_version("3.0.0"), Some((3, 0, 0))); } - // ── test_check_composer_json_valid ──────────────────────────────────────── - #[test] fn test_check_composer_json_valid() { let dir = tempdir().unwrap(); @@ -563,8 +549,6 @@ mod tests { ); } - // ── test_check_composer_json_missing ───────────────────────────────────── - #[test] fn test_check_composer_json_missing() { let dir = tempdir().unwrap(); @@ -577,8 +561,6 @@ mod tests { ); } - // ── test_check_composer_json_invalid_json ───────────────────────────────── - #[test] fn test_check_composer_json_invalid_json() { let dir = tempdir().unwrap(); @@ -591,8 +573,6 @@ mod tests { ); } - // ── test_check_composer_lock_fresh ──────────────────────────────────────── - #[test] fn test_check_composer_lock_fresh() { use mozart_registry::lockfile::LockFile; @@ -627,8 +607,6 @@ mod tests { ); } - // ── test_check_composer_lock_stale ──────────────────────────────────────── - #[test] fn test_check_composer_lock_stale() { use mozart_registry::lockfile::LockFile; @@ -663,8 +641,6 @@ mod tests { ); } - // ── test_check_composer_lock_missing ───────────────────────────────────── - #[test] fn test_check_composer_lock_missing() { let dir = tempdir().unwrap(); @@ -677,8 +653,6 @@ mod tests { ); } - // ── test_check_disk_space_ok ────────────────────────────────────────────── - #[test] fn test_check_disk_space_ok() { let dir = tempdir().unwrap(); @@ -691,8 +665,6 @@ mod tests { ); } - // ── test_check_result_exit_code_ratcheting ──────────────────────────────── - #[test] fn test_check_result_exit_code_ratcheting() { let console = Console::new(0, false, false, false, false); @@ -734,8 +706,6 @@ mod tests { assert_eq!(exit_code, 2); } - // ── test_check_http_proxy_none_set ─────────────────────────────────────── - #[test] fn test_check_http_proxy_none_set() { // Remove all proxy vars for this test @@ -769,8 +739,6 @@ mod tests { } } - // ── network tests (ignored by default) ─────────────────────────────────── - #[tokio::test] #[ignore] async fn test_check_https_packagist_connectivity() { |
