]> git.giacomolli.uk - onechat/blobdiff - daemon_test.go
Check forced-disconnect test setup failures
[onechat] / daemon_test.go
index bfb4efbcc77e2df7b4576d6e7a29f63a14e79ff0..c6cc2279a3435c514de8f943028fbc74f6cb8825 100644 (file)
@@ -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())
                })
        }