]> git.giacomolli.uk - onechat/blobdiff - daemon_test.go
Format only the Go files of the repository
[onechat] / daemon_test.go
index bfb4efbcc77e2df7b4576d6e7a29f63a14e79ff0..6a4d98c5a040456d0baf8e06fb4307542bcbb56a 100644 (file)
@@ -109,12 +109,12 @@ func TestDaemonLogHasATimeStampOnlyOutsideTheJournal(t *testing.T) {
                {
                        name:    "the journal adds the time itself",
                        journal: "8:12345",
                {
                        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: "",
                },
                {
                        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
 
 
                        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())
                })
        }
                        require.Regexp(t, tc.line, out.String())
                })
        }