From 9a47d775e7125817ed0b4219cea8bc976f6f5578 Mon Sep 17 00:00:00 2001 From: maddieford <93676569+maddieford@users.noreply.github.com> Date: Mon, 29 Apr 2024 15:50:50 -0700 Subject: [PATCH] Update agent_publish test to check for new agent update pattern (#3114) * Add new agent update pattern * Use record message * Need to update log record timestamp (cherry picked from commit 1d91c149d2ffd57f70f89daf930e5e379ec3c5af) --- .../agent_publish-get_agent_log_record_timestamp.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests_e2e/tests/scripts/agent_publish-get_agent_log_record_timestamp.py b/tests_e2e/tests/scripts/agent_publish-get_agent_log_record_timestamp.py index d055fc6c2..4fbe2365b 100755 --- a/tests_e2e/tests/scripts/agent_publish-get_agent_log_record_timestamp.py +++ b/tests_e2e/tests/scripts/agent_publish-get_agent_log_record_timestamp.py @@ -48,6 +48,11 @@ _UPDATE_PATTERN_03 = re.compile( r'(.*Agent) update found, exiting current process to (\S*) to the new Agent version (\S*)') +""" +Current Agent 2.8.9.9 completed all update checks, exiting current process to upgrade to the new Agent version 2.10.0.7 +('2.8.9.9', 'upgrade', '2.10.0.7') +""" +_UPDATE_PATTERN_04 = re.compile(r'Current Agent (\S*) completed all update checks, exiting current process to (\S*) to the new Agent version (\S*)') """ This script return timestamp of update message in the agent log @@ -60,8 +65,8 @@ def main(): for record in agentlog.read(): - for p in [_UPDATE_PATTERN_00, _UPDATE_PATTERN_01, _UPDATE_PATTERN_02, _UPDATE_PATTERN_03]: - update_match = re.match(p, record.text) + for p in [_UPDATE_PATTERN_00, _UPDATE_PATTERN_01, _UPDATE_PATTERN_02, _UPDATE_PATTERN_03, _UPDATE_PATTERN_04]: + update_match = re.match(p, record.message) if update_match: return record.timestamp