Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added testcase for yum update #3411

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions microsoft/testsuites/core/azure_image_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leverage the YumConfigManager tool, and assert exit code.

"yum update -y",
sudo=True,
)
dmesg.get_output(force_run=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get output doesn't fail the test case, if abnormal things happen. Use dmesg.check_kernel_errors or find another way to check the results.

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
Expand Down
Loading