tests: all 16 tests now sourced from org (doctor→diagnostics rename, orphaned tests adopted)
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s

This commit is contained in:
2026-05-05 09:58:00 -04:00
parent 11383a29d4
commit 817d1c5fec
11 changed files with 105 additions and 41 deletions

View File

@@ -21,6 +21,11 @@ Binary detection must use shell probing (`which`) to account for varying `$PATH`
* Phase C: Implementation (Build)
** Package Context
#+begin_src lisp
(in-package :passepartout)
#+end_src
** Global Configuration
;; REPL-VERIFIED: 2026-05-03T13:00:00
#+begin_src lisp
@@ -238,24 +243,34 @@ The doctor checks all supported LLM providers and detects local Ollama instances
* Phase D: Verification (Testing)
** Dependency Test
#+begin_src lisp :tangle no
(test test-doctor-dependency-check
#+begin_src lisp :tangle ../tests/diagnostics-tests.lisp
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload :fiveam :silent t))
(defpackage :passepartout-diagnostics-tests
(:use :cl :fiveam :passepartout)
(:export #:diagnostics-suite))
(in-package :passepartout-diagnostics-tests)
(def-suite diagnostics-suite :description "Verification of the System Diagnostics logic")
(in-suite diagnostics-suite)
(test test-diagnostics-dependency-fail
"Verify that missing binaries are correctly identified as failures."
(let ((passepartout::*diagnostics-binaries* '("non-existent-binary-123")))
(is (null (passepartout:diagnostics-dependencies-check)))))
#+end_src
(is (null (diagnostics-dependencies-check)))))
** Environment Test
#+begin_src lisp :tangle no
(test test-doctor-env-check
(test test-diagnostics-env-fail
"Verify that an invalid MEMEX_DIR triggers a critical failure."
(let ((old-m (uiop:getenv "MEMEX_DIR")))
(let ((old-m (uiop:getenv "MEMEX_DIR"))
(old-d (uiop:getenv "PASSEPARTOUT_DATA_DIR")))
(unwind-protect
(progn
(setf (uiop:getenv "MEMEX_DIR") "/non/existent/path/999")
(is (null (passepartout:diagnostics-env-check))))
(setf (uiop:getenv "MEMEX_DIR") (or old-m "")))))
(is (null (diagnostics-env-check))))
(setf (uiop:getenv "MEMEX_DIR") (or old-m ""))
(setf (uiop:getenv "PASSEPARTOUT_DATA_DIR") (or old-d "")))))
#+end_src
* Phase E: Lifecycle