From 36266deb2a04a743cc37b86f092016c309f21c90 Mon Sep 17 00:00:00 2001 From: Frank Liang Date: Tue, 24 Dec 2024 16:07:38 +0800 Subject: [PATCH] update insights_client_log save path Signed-off-by: Frank Liang --- os_tests/__init__.py | 2 +- os_tests/data/baseline_log.json | 16 ++++++++++++++-- os_tests/tests/test_general_check.py | 8 ++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/os_tests/__init__.py b/os_tests/__init__.py index 0a93c50a..12300209 100644 --- a/os_tests/__init__.py +++ b/os_tests/__init__.py @@ -1,2 +1,2 @@ __version__ = '0.4.0' -__codedate__ = '20241201' +__codedate__ = '20241224' diff --git a/os_tests/data/baseline_log.json b/os_tests/data/baseline_log.json index 3e8d9f02..9e138b6f 100644 --- a/os_tests/data/baseline_log.json +++ b/os_tests/data/baseline_log.json @@ -1482,7 +1482,7 @@ "trigger": "" }, "msg_166": { - "content": ".*systemd-udevd.*could not read from.*acpi_cpufreq/initstate.*", + "content": ".*systemd-udevd.*could not read from.*initstate.*", "analyze": "The message can be ignored since it is harmless.", "branch": "rhel", "status": "active", @@ -2339,7 +2339,7 @@ "addeddate": "20240926" }, "msg_250": { - "content": ".*Version: (invalid).*", + "content": ".*Version.*invalid.*", "analyze": "dmidecode known issue", "branch": "rhel", "status": "active", @@ -2373,5 +2373,17 @@ "cases": "os_tests.tests.test_lifecycle.TestLifeCycle.test_boot_debugkernel", "addedby": "xiliang@redhat.com", "addeddate": "20241103" + }, + "msg_253": { + "content": ".*i2c i2c-.*Failed!.*", + "analyze": "known issue", + "branch": "rhel", + "status": "active", + "link": "https://issues.redhat.com/browse/RHEL-70163", + "path": "", + "trigger": "", + "cases": "", + "addedby": "xiliang@redhat.com", + "addeddate": "20241206" } } \ No newline at end of file diff --git a/os_tests/tests/test_general_check.py b/os_tests/tests/test_general_check.py index 34d70e72..2448e53b 100644 --- a/os_tests/tests/test_general_check.py +++ b/os_tests/tests/test_general_check.py @@ -2036,6 +2036,14 @@ def test_collect_insights_result(self): else: utils_lib.run_cmd(self, 'sudo cp {} {}/attachments/'.format(gz_file, self.log_dir)) utils_lib.run_cmd(self, 'insights-client --version', msg="get insights client version after register", timeout=120) + insights_client_log = "/var/log/insights-client/insights-client.log" + insights_client_log_file_name = os.path.basename(insights_client_log) + if self.params.get('remote_node') is not None: + utils_lib.run_cmd(self, 'sudo cp {} /tmp/'.format(insights_client_log)) + utils_lib.run_cmd(self, 'sudo chmod 777 /tmp/{}'.format(insights_client_log_file_name)) + self.SSH.get_file(rmt_file='/tmp/{}'.format(insights_client_log_file_name),local_file='{}/attachments/{}'.format(self.log_dir,insights_client_log_file_name)) + else: + utils_lib.run_cmd(self, 'sudo cp {} {}/attachments/'.format(insights_client_log, self.log_dir)) try: tmp_dict = json.loads(result_out) if len(tmp_dict) > 0: