tests: Finish cloner.py coverage

This commit is contained in:
Cole Robinson 2019-06-16 13:42:08 -04:00
parent 03ded3e2bc
commit df82856021
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,23 @@
<domain type='kvm'>
<name>clone-orig</name>
<uuid>aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82</uuid>
<memory>262144</memory>
<currentMemory>262144</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='cdrom'/>
<loader readonly='yes' type='pflash'>/usr/share/ovmf/ovmf-efi.fd</loader>
<nvram>/nvram/clone-orig_VARS.fd</nvram>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
</devices>
</domain>

View File

@ -1240,6 +1240,7 @@ c.add_compare("--add-device --network default --os-variant http://fedoraproject.
_CLONE_UNMANAGED = "%s/clone-disk.xml" % XMLDIR
_CLONE_MANAGED = "%s/clone-disk-managed.xml" % XMLDIR
_CLONE_NOEXIST = "%s/clone-disk-noexist.xml" % XMLDIR
_CLONE_NVRAM = "%s/clone-nvram-auto.xml" % XMLDIR
vclon = App("virt-clone")
c = vclon.add_category("remote", "--connect %(URI-TEST-REMOTE)s")
@ -1252,6 +1253,7 @@ c.add_invalid("--original-xml " + _CLONE_UNMANAGED + " --auto-clone") # Auto fl
c = vclon.add_category("misc", "")
c.add_compare("--connect %(URI-KVM)s -o test-clone --auto-clone --clone-running", "clone-auto1")
c.add_compare("--connect %(URI-TEST-FULL)s -o test-clone-simple --name newvm --auto-clone --clone-running", "clone-auto2")
c.add_valid("--connect %(URI-KVM)s --original-xml " + _CLONE_NVRAM + " --auto-clone --clone-running") # hits a particular nvram code path
c.add_valid("-o test --auto-clone --uuid 12345678-12F4-1234-1234-123456789AFA --reflink --mac 12:34:56:1A:B2:C3") # Auto flag, no storage
c.add_valid("--original-xml " + _CLONE_MANAGED + " --auto-clone") # Auto flag w/ managed storage
c.add_valid("--original-xml " + _CLONE_UNMANAGED + " --auto-clone") # Auto flag w/ local storage