X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/522d7fd117285e4e4ce3ea5ec9b5a1722521b681..5a93b6124068c2a8748fc0bfbb2a2d151815bcf0:/whatsapp_fake_helper_test.go diff --git a/whatsapp_fake_helper_test.go b/whatsapp_fake_helper_test.go index 1625fe3..d8bb9bb 100644 --- a/whatsapp_fake_helper_test.go +++ b/whatsapp_fake_helper_test.go @@ -3,8 +3,7 @@ package main import ( "context" "fmt" - "io" - "log" + "log/slog" "os" "path/filepath" "slices" @@ -261,7 +260,7 @@ func whatsappStartTest(t *testing.T, dir string, clock *TestClock) (*WhatsApp, * } logs := &SyncBuffer{} - whatsapp, err := openWhatsApp(t.Context(), dir, clock.Now, log.New(logs, "", 0), fake.newClient) + whatsapp, err := openWhatsApp(t.Context(), dir, clock.Now, daemonTestLogger(logs), fake.newClient) require.NoError(t, err) t.Cleanup(func() { @@ -306,8 +305,8 @@ func whatsappTestSession(t *testing.T, dir string, linked bool) { } // whatsappDiscardLog is a logger for a WhatsApp whose log a test does not read. -func whatsappDiscardLog() *log.Logger { - return log.New(io.Discard, "", 0) +func whatsappDiscardLog() *slog.Logger { + return slog.New(slog.DiscardHandler) } // whatsappTestMessage returns the event of the text message id of sender in