feat(chaos): implement Tier 2 Integration Chaos for Memory, Networking, and LLM Gateway
This commit is contained in:
@@ -10,6 +10,27 @@
|
||||
* Overview
|
||||
The *LLM Gateway* skill provides a unified interface for interacting with multiple Large Language Model providers.
|
||||
|
||||
* Test Suite
|
||||
#+begin_src lisp :tangle (expand-file-name "llm-gateway-tests.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/tests"))
|
||||
(defpackage :opencortex-llm-gateway-tests
|
||||
(:use :cl :fiveam :opencortex)
|
||||
(:export #:llm-gateway-suite))
|
||||
|
||||
(in-package :opencortex-llm-gateway-tests)
|
||||
|
||||
(def-suite llm-gateway-suite :description "Tests for the LLM Gateway skill")
|
||||
(in-suite llm-gateway-suite)
|
||||
|
||||
(test test-llm-gateway-timeout
|
||||
"Tier 2 Chaos: Verify that LLM Gateway handles connection failures gracefully."
|
||||
;; Point to a non-existent port to force a connection error
|
||||
(let ((uiop:*environment* (copy-list uiop:*environment*)))
|
||||
(setf (uiop:getenv "OLLAMA_HOST") "localhost:1")
|
||||
(let ((result (opencortex::execute-llm-request :prompt "hello" :provider :ollama)))
|
||||
(is (eq (getf result :status) :error))
|
||||
(is (uiop:string-prefix-p "Ollama Failure" (getf result :message))))))
|
||||
#+end_src
|
||||
|
||||
* Implementation
|
||||
|
||||
** Package Context
|
||||
|
||||
Reference in New Issue
Block a user