From b3bb468b9b5dd52f66322bc1272524a1f4fb1a56 Mon Sep 17 00:00:00 2001 From: Rajiv Harlalka Date: Thu, 18 Jan 2024 05:03:48 +0530 Subject: [PATCH] Tests: Add test in syslogger for `LOG_EMERG` level (#14942) Signed-off-by: Rajiv Harlalka Signed-off-by: Matt Lord Co-authored-by: Matt Lord --- go/event/syslogger/syslogger_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/go/event/syslogger/syslogger_test.go b/go/event/syslogger/syslogger_test.go index 8217b945baa..28925d2ac52 100644 --- a/go/event/syslogger/syslogger_test.go +++ b/go/event/syslogger/syslogger_test.go @@ -103,6 +103,11 @@ func TestBadWriter(t *testing.T) { if !strings.Contains(tl.getLog().level, wantLevel) { t.Errorf("error log level [%s], want level [%s]", tl.getLog().level, wantLevel) } + ev = &TestEvent{priority: syslog.LOG_EMERG, message: wantMsg} + event.Dispatch(ev) + if !strings.Contains(tl.getLog().level, wantLevel) { + t.Errorf("error log level [%s], want level [%s]", tl.getLog().level, wantLevel) + } wantLevel = "WARNING" ev = &TestEvent{priority: syslog.LOG_WARNING, message: wantMsg}