Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions tests/openai-compatible-provider-tests.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@
:model model
:reasoning-effort "minimal"))
(let ((authenticated-configuration nil)
(authenticated-selection :unset))
(authenticated-selection :unset)
(live-application (make-instance 'application))
(reconnect-called-p nil))
(test-call-with-function-replacements
(list
(list 'configuration-create
Expand Down Expand Up @@ -275,14 +277,24 @@
(setf authenticated-configuration configuration
authenticated-selection selection)
nil))
(list 'application-reconnect
(lambda (application &rest arguments)
(declare (ignore arguments))
(setf reconnect-called-p t)
application))
;; Authentication continues into a session; a real interactive
;; loop against the test's non-terminal stdin can wait forever.
(list 'application-run
(lambda (application &rest arguments)
(declare (ignore application arguments))
nil)))
(lambda ()
(main-dispatch '("auth"))))
(lambda ()
(let ((*active-application* live-application))
(let ((*active-application* nil))
(main-dispatch '("auth"))))))
(test-assert
(not reconnect-called-p)
"bare auth does not reconnect the active application")
(test-assert
(and authenticated-configuration
(null authenticated-selection)
Expand Down