mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
tests: make test-clone VMs offline by default
Simplifies test cases
This commit is contained in:
parent
84d8cd9896
commit
ed92e03f39
@ -22,19 +22,16 @@
|
||||
<disk type="block" device="floppy">
|
||||
<driver type="vmdk"/>
|
||||
<source dev="/dev/disk-pool/diskvol1-clone"/>
|
||||
<backingStore/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
<source dev="/dev/disk-pool/diskvol2"/>
|
||||
<backingStore/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
<readonly/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
</disk>
|
||||
<disk type="block" device="cdrom">
|
||||
<backingStore/>
|
||||
<target dev="sdb" bus="scsi"/>
|
||||
<readonly/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
|
||||
@ -42,7 +39,6 @@
|
||||
<disk type="block" device="disk">
|
||||
<driver type="qcow2"/>
|
||||
<source dev="/dev/default-pool/collidevol1.img"/>
|
||||
<backingStore/>
|
||||
<target dev="sdc" bus="scsi"/>
|
||||
<readonly/>
|
||||
<shareable/>
|
||||
@ -50,13 +46,11 @@
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/dev/default-pool/default-vol-clone"/>
|
||||
<backingStore/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/dev/default-pool/testvol2-clone.img"/>
|
||||
<backingStore/>
|
||||
<target dev="hdb" bus="ide"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
|
||||
</disk>
|
||||
|
@ -22,7 +22,6 @@
|
||||
<disk type="file" device="disk">
|
||||
<driver type="qcow2"/>
|
||||
<source file="/dev/default-pool/newvm.img"/>
|
||||
<backingStore/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
</disk>
|
||||
|
@ -943,10 +943,10 @@ c.add_valid("-o test --auto-clone") # Auto flag, no storage
|
||||
c.add_valid("--original-xml %(CLONE_STORAGE_XML)s --auto-clone") # Auto flag w/ managed storage
|
||||
c.add_valid("--original-xml %(CLONE_DISK_XML)s --auto-clone") # Auto flag w/ local storage
|
||||
c.add_valid("-o test-clone --auto-clone --clone-running") # Auto flag, actual VM, skip state check
|
||||
c.add_valid("-o test-clone-simple -n newvm --preserve-data --file %(EXISTIMG1)s --clone-running") # Preserve data shouldn't complain about existing volume
|
||||
c.add_valid("-o test-clone-simple -n newvm --preserve-data --file %(EXISTIMG1)s") # Preserve data shouldn't complain about existing volume
|
||||
c.add_valid("-n clonetest --original-xml %(CLONE_DISK_XML)s --file %(EXISTIMG3)s --file %(EXISTIMG4)s --check path_exists=off") # Skip existing file check
|
||||
c.add_invalid("--auto-clone") # Just the auto flag
|
||||
c.add_invalid("-o test-clone --auto-clone")
|
||||
c.add_invalid("-o test-many-devices --auto-clone") # VM is running, but --clone-running isn't passed
|
||||
c.add_invalid("-o test-clone-simple -n newvm --file %(EXISTIMG1)s --clone-running") # Should complain about overwriting existing file
|
||||
|
||||
|
||||
|
@ -764,7 +764,8 @@ test-many-devices, like an alternate RNG.
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
<domain type='test'>
|
||||
<domain type='test' xmlns:test='http://libvirt.org/schemas/domain/test/1.0'>
|
||||
<test:runstate>5</test:runstate>
|
||||
<name>test-clone-simple</name>
|
||||
<currentMemory>204800</currentMemory>
|
||||
<memory>409600</memory>
|
||||
@ -799,7 +800,8 @@ test-many-devices, like an alternate RNG.
|
||||
</domain>
|
||||
|
||||
|
||||
<domain type='test'>
|
||||
<domain type='test' xmlns:test='http://libvirt.org/schemas/domain/test/1.0'>
|
||||
<test:runstate>5</test:runstate>
|
||||
<name>test-clone</name>
|
||||
<currentMemory>204800</currentMemory>
|
||||
<memory>409600</memory>
|
||||
@ -866,7 +868,8 @@ test-many-devices, like an alternate RNG.
|
||||
</domain>
|
||||
|
||||
|
||||
<domain type='test'>
|
||||
<domain type='test' xmlns:test='http://libvirt.org/schemas/domain/test/1.0'>
|
||||
<test:runstate>5</test:runstate>
|
||||
<name>test-clone-halffull</name>
|
||||
<currentMemory>204800</currentMemory>
|
||||
<memory>409600</memory>
|
||||
@ -901,7 +904,8 @@ test-many-devices, like an alternate RNG.
|
||||
</domain>
|
||||
|
||||
|
||||
<domain type='test'>
|
||||
<domain type='test' xmlns:test='http://libvirt.org/schemas/domain/test/1.0'>
|
||||
<test:runstate>5</test:runstate>
|
||||
<name>test-clone-full</name>
|
||||
<currentMemory>204800</currentMemory>
|
||||
<memory>409600</memory>
|
||||
|
@ -43,7 +43,7 @@ class VMMCLI(unittest.TestCase):
|
||||
|
||||
win = uiutils.find_fuzzy(self.app.root, "test-clone-simple on", "frame")
|
||||
self.assertFalse(
|
||||
uiutils.find_fuzzy(win, "Graphical console not", "label").showing)
|
||||
uiutils.find_fuzzy(win, "Guest is not running", "label").showing)
|
||||
self.assertTrue(
|
||||
uiutils.find_fuzzy(win, "add-hardware", "button").showing)
|
||||
self.app.quit()
|
||||
@ -55,7 +55,7 @@ class VMMCLI(unittest.TestCase):
|
||||
|
||||
win = uiutils.find_fuzzy(self.app.root, "test-clone-simple on", "frame")
|
||||
self.assertFalse(
|
||||
uiutils.find_fuzzy(win, "Graphical console not", "label").showing)
|
||||
uiutils.find_fuzzy(win, "Guest is not running", "label").showing)
|
||||
self.assertTrue(
|
||||
uiutils.find_fuzzy(win, "CPU usage", "label").showing)
|
||||
self.app.quit()
|
||||
@ -66,7 +66,7 @@ class VMMCLI(unittest.TestCase):
|
||||
|
||||
win = uiutils.find_fuzzy(self.app.root, "test-clone-simple on", "frame")
|
||||
self.assertTrue(
|
||||
uiutils.find_fuzzy(win, "Graphical console not", "label").showing)
|
||||
uiutils.find_fuzzy(win, "Guest is not running", "label").showing)
|
||||
self.assertFalse(
|
||||
uiutils.find_fuzzy(win, "add-hardware", "button").showing)
|
||||
self.app.quit()
|
||||
|
Loading…
Reference in New Issue
Block a user