From 0132c2b6fbbdef3616c8124c13e9eb8e1135212d Mon Sep 17 00:00:00 2001 From: Marc Guasch Date: Wed, 15 Jan 2025 12:08:02 +0100 Subject: [PATCH] Fix test for win2016 --- winlogbeat/tests/system/test_wineventlog.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/winlogbeat/tests/system/test_wineventlog.py b/winlogbeat/tests/system/test_wineventlog.py index 580d82989cf..4c31ac5b2e4 100644 --- a/winlogbeat/tests/system/test_wineventlog.py +++ b/winlogbeat/tests/system/test_wineventlog.py @@ -149,10 +149,9 @@ def test_read_unknown_event_id(self): "winlog.keywords": ["Classic"], }) - self.assertEqual( - "failed to get the event message string: failed in EvtFormatMessage:" - " The message resource is present but the message was not found in the message table.", - evts[0]["error.message"] + # we just check the prefix since the specific message changes depending on the windows version + self.assertTrue( + evts[0]["error.message"].startsWith("failed to get the event message string: failed in EvtFormatMessage:") ) def test_read_unknown_sid(self):