X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/522d7fd117285e4e4ce3ea5ec9b5a1722521b681..4a42f7f208cbfead335eba9ebe615b35b1742130:/daemon_test.go?ds=sidebyside diff --git a/daemon_test.go b/daemon_test.go index bfb4efb..c6cc227 100644 --- a/daemon_test.go +++ b/daemon_test.go @@ -39,7 +39,7 @@ func TestClientsSeeTheTurnAsItHappens(t *testing.T) { first.Type(stopCommand) first.WaitFor(t, "[error] no turn runs") first.Type(stopCommand + " BlueFox") - first.WaitFor(t, "[error] no subagent BlueFox runs") + first.WaitFor(t, "[error] stop subagent: no subagent BlueFox runs") require.NotContains(t, second.Output(), "no turn runs") require.NoError(t, first.Close()) } @@ -109,12 +109,12 @@ func TestDaemonLogHasATimeStampOnlyOutsideTheJournal(t *testing.T) { { name: "the journal adds the time itself", journal: "8:12345", - line: `^onechat: the agent is ready\n$`, + line: `^<6>onechat: the agent is ready\n$`, }, { name: "a terminal gets the time in the line", journal: "", - line: `^onechat: \d{4}/\d\d/\d\d \d\d:\d\d:\d\d the agent is ready\n$`, + line: `^\d{4}/\d\d/\d\d \d\d:\d\d:\d\d INFO onechat: the agent is ready\n$`, }, } @@ -124,7 +124,7 @@ func TestDaemonLogHasATimeStampOnlyOutsideTheJournal(t *testing.T) { var out strings.Builder - daemonLogger(&out, "onechat: ").Print("the agent is ready") + daemonLogger(&out, "onechat: ").Info("the agent is ready") require.Regexp(t, tc.line, out.String()) }) }