Skip to content

Commit 2b72f6b

Browse files
authored
Correct extend and append in check_windows_vm_hvinfo (RedHatQE#2634)
##### Short description: Correct extend and append in check_windows_vm_hvinfo ##### More details: Extand should be used on lists while append should be used on strings, this PR aim to fix those in check_windows_vm_hvinfo ##### Which issue(s) this PR fixes: RedHatQE#2624 (comment) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed VM recommendation failure reporting so all individual failures are listed clearly rather than grouped or nested. * Corrected Hyper‑V support validation so a single clear error is recorded when support is missing, avoiding fragmented or character-level error entries. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: rkishner <rkishner@redhat.com>
1 parent 6c0125e commit 2b72f6b

File tree

1 file changed

+2
-2
lines changed
  • tests/virt/cluster/common_templates

1 file changed

+2
-2
lines changed

tests/virt/cluster/common_templates/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ def _check_hyperv_recommendations():
531531
]
532532

533533
if failed_vm_recommendations:
534-
failed_recommendations.append(failed_vm_recommendations)
534+
failed_recommendations.extend(failed_vm_recommendations)
535535

536536
spinlocks = vm_recommendations_dict["SpinlockRetries"]
537537
if int(spinlocks) != 8191:
@@ -575,7 +575,7 @@ def _check_hyperv_features():
575575
failed_windows_hyperv_list.extend(_check_hyperv_features())
576576

577577
if not hvinfo_dict["HyperVsupport"]:
578-
failed_windows_hyperv_list.extend("HyperVsupport")
578+
failed_windows_hyperv_list.append("HyperVsupport")
579579

580580
assert not failed_windows_hyperv_list, (
581581
f"The following hyperV flags are not set correctly in the guest: {failed_windows_hyperv_list}\n"

0 commit comments

Comments
 (0)