()
| 73 | /// and report the Docker check as FAILED. |
| 74 | #[tokio::test] |
| 75 | async fn doctor_check_fails_without_docker() { |
| 76 | let (output, code, elapsed) = run_without_docker(&["doctor", "check"]).await; |
| 77 | |
| 78 | assert_ne!( |
| 79 | code, 0, |
| 80 | "doctor check should fail when Docker is unavailable, output:\n{output}" |
| 81 | ); |
| 82 | |
| 83 | assert!( |
| 84 | elapsed.as_secs() < 10, |
| 85 | "doctor check should complete quickly (took {}s)", |
| 86 | elapsed.as_secs() |
| 87 | ); |
| 88 | |
| 89 | let clean = strip_ansi(&output); |
| 90 | assert!( |
| 91 | clean.contains("FAILED"), |
| 92 | "doctor check should report Docker as FAILED:\n{clean}" |
| 93 | ); |
| 94 | } |
| 95 | |
| 96 | /// `openshell doctor check` output should include the check label |
| 97 | /// so the user knows what was tested. |
nothing calls this directly
no test coverage detected