feat(chaos): implement Tier 2 Integration Chaos for Memory, Networking, and LLM Gateway

This commit is contained in:
2026-04-28 17:32:15 -04:00
parent fc0c069d65
commit e31222d6e3
12 changed files with 185 additions and 96 deletions

View File

@@ -0,0 +1,17 @@
(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))))))