mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-21 23:28:19 +00:00
e9ff86126c
The kvm unit tests loaded xCAT-server/lib/xcat/plugins/kvm.pm with a fake Sys::Virt and monitorctrl in %INC, an XCATROOT redirect, and package variables made public only so that a test could set them. Add xCAT::KVMUtils, a module that loads no xCAT module and no libvirt binding. It holds the guest architecture profile, the CPU, emulator and video model choices, and the disk model, prefix and bus choices, each as a sub that takes its inputs and returns its answer. The three tests call these subs directly and assert that the module loads no other xCAT module. XCAT::Test::KvmPlugin is deleted. A new case covers the video model of an aarch64 guest on an aarch64 hypervisor. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>