X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/4343ca5fb6cc86eb887951f4fe16063bab29a238..2a528fe2981639cf099c713a6be16b8ea0e2cc67:/compactor_test.go?ds=sidebyside diff --git a/compactor_test.go b/compactor_test.go index baa7f57..dcd9c33 100644 --- a/compactor_test.go +++ b/compactor_test.go @@ -129,16 +129,19 @@ func TestCompactorFailsWithoutALine(t *testing.T) { want string }{ { - name: "failed call", + name: "reports the model call failure", reply: func(w http.ResponseWriter, _ ModelFakeCall) { w.WriteHeader(http.StatusInternalServerError) - _, _ = io.WriteString(w, "down") + _, err := io.WriteString(w, "down") + if err != nil { + panic(err) + } }, want: "HTTP 500", }, { - name: "tool call and no text", + name: "refuses a response without summary text", reply: func(w http.ResponseWriter, _ ModelFakeCall) { modelWriteEvents(w, modelCompletedEvent([]any{map[string]any{"type": "function_call", "name": "zoom", "arguments": "{}"}}, 100, 0, 5)) },