X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/a3b9849a54a6cd8a4cc5b1ae03a39aab31322f7b..522d7fd117285e4e4ce3ea5ec9b5a1722521b681:/daemon_test.go?ds=inline diff --git a/daemon_test.go b/daemon_test.go index 6a8cd3e..bfb4efb 100644 --- a/daemon_test.go +++ b/daemon_test.go @@ -16,6 +16,7 @@ func TestClientsSeeTheTurnAsItHappens(t *testing.T) { server.reply = func(w http.ResponseWriter, call ModelFakeCall) { if call.number == 0 { modelWriteEvents(w, modelCompletedEvent([]any{modelFunctionCallItem("fc_1", "call_1", "shell", `{"command":"echo hi"}`)}, 100, 0, 5)) + return } @@ -29,6 +30,7 @@ func TestClientsSeeTheTurnAsItHappens(t *testing.T) { second.WaitFor(t, "[connected to OneChat]") first.Type("Run echo hi.") + for _, client := range []*TerminalTestClient{first, second} { client.WaitFor(t, "[done]") require.Equal(t, "[connected to OneChat]\n[working]\n[tool] shell {\"command\":\"echo hi\"}\n[result] hi\nIt said hi.\n[done]\n", client.Output()) @@ -121,6 +123,7 @@ func TestDaemonLogHasATimeStampOnlyOutsideTheJournal(t *testing.T) { t.Setenv("JOURNAL_STREAM", tc.journal) var out strings.Builder + daemonLogger(&out, "onechat: ").Print("the agent is ready") require.Regexp(t, tc.line, out.String()) })