mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-26 21:57:33 +03:00
tests: Greatly expand testdriver.xml
Mostly comes from my own testdriver I used for manual virt-manager testing. Add some notes to HACKING about using it.
This commit is contained in:
parent
7ae458f1ba
commit
6f7fca5f2a
17
HACKING
17
HACKING
@ -22,8 +22,14 @@ to see a code coverage report.
|
||||
|
||||
'test*' have a --debug option if you are hitting problems.
|
||||
|
||||
For translations, please sign up for transifex.com and contribute to the
|
||||
virt-manager project.
|
||||
One useful way to manually test virt-manager's UI is using libvirt's
|
||||
unit test driver. From the source directory, Launch virt-manager like:
|
||||
|
||||
virt-manager --connect test://$PWD/tests/testdriver.xml
|
||||
|
||||
This testdriver has many fake XML definitions that can be used to see
|
||||
each bit of virt-manager's UI. It also enables testing the various wizards
|
||||
without having to alter your host virt config.
|
||||
|
||||
|
||||
Submitting patches
|
||||
@ -41,3 +47,10 @@ For an web view, see:
|
||||
Patches should be sent to the mailing list (see README for details). Using
|
||||
git format-patch/send-email is preferred, but an attachment with
|
||||
format-patch output is fine too.
|
||||
|
||||
|
||||
Translations
|
||||
============
|
||||
|
||||
For translations, please sign up for transifex.com and contribute to the
|
||||
virt-manager project.
|
||||
|
@ -1,4 +1,4 @@
|
||||
<domain type="test" id="3">
|
||||
<domain type="test" id="5">
|
||||
<name>test-for-clone1</name>
|
||||
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||
<memory unit="KiB">409600</memory>
|
||||
@ -19,12 +19,18 @@
|
||||
<on_crash>restart</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<disk type="block" device="disk">
|
||||
<disk type="block" device="floppy">
|
||||
<source dev="/disk-pool/diskvol1-clone"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
<target dev="fda" bus="fdc"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
<driver name="qemu" type="raw"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
<source dev="/disk-pool/diskvol2"/>
|
||||
<target dev="sda" bus="scsi"/>
|
||||
<readonly/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
</disk>
|
||||
<disk type="block" device="cdrom">
|
||||
<target dev="sdb" bus="scsi"/>
|
||||
<readonly/>
|
||||
@ -34,24 +40,24 @@
|
||||
<source dev="/default-pool/collidevol1.img"/>
|
||||
<target dev="sdc" bus="scsi"/>
|
||||
<readonly/>
|
||||
<shareable/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="2"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<target dev="sdd" bus="scsi"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="3"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/default-pool/default-vol-clone"/>
|
||||
</disk>
|
||||
<disk type="block" device="disk">
|
||||
<source dev="/default-pool/sharevol.img"/>
|
||||
<target dev="sdx" bus="scsi"/>
|
||||
<shareable/>
|
||||
<address type="drive" controller="3" bus="0" target="0" unit="2"/>
|
||||
<disk type="file" device="disk">
|
||||
<target dev="hdb" bus="ide"/>
|
||||
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/default-pool/testvol2-clone.img"/>
|
||||
</disk>
|
||||
<controller type="scsi" index="0"/>
|
||||
<controller type="scsi" index="1"/>
|
||||
<controller type="scsi" index="2"/>
|
||||
<controller type="scsi" index="3"/>
|
||||
<controller type="fdc" index="0"/>
|
||||
<controller type="ide" index="0"/>
|
||||
<interface type="network">
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
<source network="default"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<domain type="test" id="2">
|
||||
<domain type="test" id="4">
|
||||
<name>newvm</name>
|
||||
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||
<memory unit="KiB">409600</memory>
|
||||
|
@ -17,6 +17,11 @@
|
||||
</interface>
|
||||
<interface type='bond' name='bond-brbond'>
|
||||
<start mode='none'/>
|
||||
<protocol family='ipv6'>
|
||||
<ip address='3ffe:ffff:0:5::1' prefix='128'/>
|
||||
<ip address='3ffe:ffff:0:5::3' prefix='128'/>
|
||||
<ip address='3ffe:ffff:0:5::5' prefix='128'/>
|
||||
</protocol>
|
||||
<bond mode='active-backup'>
|
||||
<miimon freq='100' updelay='10' carrier='ioctl'/>
|
||||
<interface type='ethernet' name='brbond-eth0'>
|
||||
|
@ -4,6 +4,11 @@
|
||||
</interface>
|
||||
<interface type='bond' name='bond-brbond'>
|
||||
<start mode='none'/>
|
||||
<protocol family='ipv6'>
|
||||
<ip address='3ffe:ffff:0:5::1' prefix='128'/>
|
||||
<ip address='3ffe:ffff:0:5::3' prefix='128'/>
|
||||
<ip address='3ffe:ffff:0:5::5' prefix='128'/>
|
||||
</protocol>
|
||||
<bond mode='active-backup'>
|
||||
<miimon freq='100' updelay='10' carrier='ioctl'/>
|
||||
<interface type='ethernet' name='brbond-eth0'>
|
||||
|
1145
tests/testdriver.xml
1145
tests/testdriver.xml
File diff suppressed because it is too large
Load Diff
@ -341,8 +341,8 @@ class VirtualNetworkInterface(VirtualDevice):
|
||||
|
||||
if (_countMACaddr(vms, mac) > 0 or
|
||||
_countMACaddr(inactive_vm, mac) > 0):
|
||||
return (True, _("The MAC address you entered is already in use "
|
||||
"by another virtual machine."))
|
||||
return (True, _("The MAC address '%s' is in use "
|
||||
"by another virtual machine.") % mac)
|
||||
|
||||
return (False, None)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user