From 76a1f2eee8f4bef98ade01937edd6ba910f7b8ac Mon Sep 17 00:00:00 2001 From: SrikanthMyakam Date: Fri, 6 Sep 2024 11:55:05 +0530 Subject: [PATCH] Update azure_image_standard.py Added testcase for yum update --- .../testsuites/core/azure_image_standard.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/microsoft/testsuites/core/azure_image_standard.py b/microsoft/testsuites/core/azure_image_standard.py index b32b233447..e4750de061 100644 --- a/microsoft/testsuites/core/azure_image_standard.py +++ b/microsoft/testsuites/core/azure_image_standard.py @@ -518,6 +518,28 @@ def verify_yum_conf(self, node: Node) -> None: else: raise SkippedException(f"Unsupported distro type : {type(node.os)}") + @TestCaseMetadata( + description=""" + Verify if there is any issues in and after 'yum update' + + Steps: + 1. Run 'yum update -y' command. + 2. Get the output of dmesg to see if the VM is still in good state. + """, + priority=2, + requirement=simple_requirement(supported_platform_type=[AZURE, READY]), + ) + def verify_yum_update(self, node: Node) -> None: + dmesg = node.tools[Dmesg] + if isinstance(node.os, Fedora): + node.execute( + "yum update -y", + sudo=True, + ) + dmesg.get_output(force_run=True) + else: + raise SkippedException(f"Unsupported distro type : {type(node.os)}") + @TestCaseMetadata( description=""" This test will check that kvp daemon is installed. This is an optional