fix(test): use dynamic symbol lookup for jailed llm-gateway test

This commit is contained in:
2026-04-28 17:38:23 -04:00
parent 5323f759d0
commit 10206860db

View File

@@ -28,9 +28,13 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
(unwind-protect (unwind-protect
(progn (progn
(setf (uiop:getenv "OLLAMA_HOST") "localhost:1") (setf (uiop:getenv "OLLAMA_HOST") "localhost:1")
(let ((result (opencortex.skills.org-skill-llm-gateway::execute-llm-request :prompt "hello" :provider :ollama))) (let ((fn (or (find-symbol "EXECUTE-LLM-REQUEST" :opencortex.skills.org-skill-llm-gateway)
(is (eq (getf result :status) :error)) (find-symbol "EXECUTE-LLM-REQUEST" :opencortex))))
(is (uiop:string-prefix-p "Ollama Failure" (getf result :message))))) (if fn
(let ((result (funcall fn :prompt "hello" :provider :ollama)))
(is (eq (getf result :status) :error))
(is (uiop:string-prefix-p "Ollama Failure" (getf result :message))))
(fail "Could not find EXECUTE-LLM-REQUEST symbol"))))
(setf (uiop:getenv "OLLAMA_HOST") old-host)))) (setf (uiop:getenv "OLLAMA_HOST") old-host))))
#+end_src #+end_src