mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-03 01:18:00 +03:00
tests: data: Move all cli/ bits to their own directories
Move the content to: * cli/virtclone/ * cli/unattended/ * fakemedia/ Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
900ff8c3e1
commit
e2419869e7
@ -39,7 +39,7 @@
|
|||||||
</disk>
|
</disk>
|
||||||
<disk type="file" device="cdrom">
|
<disk type="file" device="cdrom">
|
||||||
<driver name="qemu"/>
|
<driver name="qemu"/>
|
||||||
<source file="tests/data/cli/fake-centos65-label.iso"/>
|
<source file="tests/data/fakemedia/fake-centos65-label.iso"/>
|
||||||
<target dev="hda" bus="ide"/>
|
<target dev="hda" bus="ide"/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
</disk>
|
</disk>
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
</disk>
|
</disk>
|
||||||
<disk type="file" device="cdrom">
|
<disk type="file" device="cdrom">
|
||||||
<driver name="qemu"/>
|
<driver name="qemu"/>
|
||||||
<source file="tests/data/cli/fake-fedora17-tree.iso"/>
|
<source file="tests/data/fakemedia/fake-fedora17-tree.iso"/>
|
||||||
<target dev="hda" bus="ide"/>
|
<target dev="hda" bus="ide"/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
</disk>
|
</disk>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
<disk type="file" device="cdrom">
|
<disk type="file" device="cdrom">
|
||||||
<driver name="qemu"/>
|
<driver name="qemu"/>
|
||||||
<source file="tests/data/cli/fake-no-osinfo.iso"/>
|
<source file="tests/data/fakemedia/fake-no-osinfo.iso"/>
|
||||||
<target dev="hda" bus="ide"/>
|
<target dev="hda" bus="ide"/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
</disk>
|
</disk>
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
<disk type="file" device="cdrom">
|
<disk type="file" device="cdrom">
|
||||||
<driver name="qemu"/>
|
<driver name="qemu"/>
|
||||||
<source file="tests/data/cli/fake-f26-netinst.iso"/>
|
<source file="tests/data/fakemedia/fake-f26-netinst.iso"/>
|
||||||
<target dev="sda" bus="sata"/>
|
<target dev="sda" bus="sata"/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
</disk>
|
</disk>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
<disk type="file" device="cdrom">
|
<disk type="file" device="cdrom">
|
||||||
<driver name="qemu"/>
|
<driver name="qemu"/>
|
||||||
<source file="tests/data/cli/fake-win7.iso"/>
|
<source file="tests/data/fakemedia/fake-win7.iso"/>
|
||||||
<target dev="sda" bus="sata"/>
|
<target dev="sda" bus="sata"/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
</disk>
|
</disk>
|
||||||
@ -113,7 +113,7 @@
|
|||||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
<disk type="file" device="cdrom">
|
<disk type="file" device="cdrom">
|
||||||
<driver name="qemu"/>
|
<driver name="qemu"/>
|
||||||
<source file="tests/data/cli/fake-win7.iso"/>
|
<source file="tests/data/fakemedia/fake-win7.iso"/>
|
||||||
<target dev="sda" bus="sata"/>
|
<target dev="sda" bus="sata"/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
</disk>
|
</disk>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<target dev="hdc" bus="ide"/>
|
<target dev="hdc" bus="ide"/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
<address type="drive" controller="0" bus="1" target="0" unit="0"/>
|
<address type="drive" controller="0" bus="1" target="0" unit="0"/>
|
||||||
<source file="tests/data/cli/fake-win7.iso"/>
|
<source file="tests/data/fakemedia/fake-win7.iso"/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type="ide" index="0"/>
|
<controller type="ide" index="0"/>
|
||||||
<disk type="file" device="cdrom">
|
<disk type="file" device="cdrom">
|
||||||
@ -51,7 +51,7 @@
|
|||||||
<target dev="hdc" bus="ide"/>
|
<target dev="hdc" bus="ide"/>
|
||||||
<readonly/>
|
<readonly/>
|
||||||
<address type="drive" controller="0" bus="1" target="0" unit="0"/>
|
<address type="drive" controller="0" bus="1" target="0" unit="0"/>
|
||||||
<source file="tests/data/cli/fake-win7.iso"/>
|
<source file="tests/data/fakemedia/fake-win7.iso"/>
|
||||||
</disk>
|
</disk>
|
||||||
<controller type="ide" index="0"/>
|
<controller type="ide" index="0"/>
|
||||||
</devices>
|
</devices>
|
||||||
|
@ -34,6 +34,8 @@ os.environ["DISPLAY"] = ":3.4"
|
|||||||
TMP_IMAGE_DIR = "/tmp/__virtinst_cli_"
|
TMP_IMAGE_DIR = "/tmp/__virtinst_cli_"
|
||||||
_ABSXMLDIR = utils.DATADIR + "/cli"
|
_ABSXMLDIR = utils.DATADIR + "/cli"
|
||||||
XMLDIR = os.path.relpath(_ABSXMLDIR, utils.TOPDIR)
|
XMLDIR = os.path.relpath(_ABSXMLDIR, utils.TOPDIR)
|
||||||
|
MEDIA_DIR = os.path.relpath(utils.DATADIR + "/fakemedia", utils.TOPDIR)
|
||||||
|
UNATTENDED_DIR = XMLDIR + "/unattended"
|
||||||
OLD_OSINFO = utils.has_old_osinfo()
|
OLD_OSINFO = utils.has_old_osinfo()
|
||||||
NO_OSINFO_UNATTEND = not unattended.OSInstallScript.have_new_libosinfo()
|
NO_OSINFO_UNATTEND = not unattended.OSInstallScript.have_new_libosinfo()
|
||||||
HAS_ISOINFO = shutil.which("isoinfo")
|
HAS_ISOINFO = shutil.which("isoinfo")
|
||||||
@ -79,16 +81,16 @@ TEST_DATA = {
|
|||||||
'EXISTIMG2': "/dev/default-pool/testvol2.img",
|
'EXISTIMG2': "/dev/default-pool/testvol2.img",
|
||||||
'EXISTIMG3': EXIST_FILES[0],
|
'EXISTIMG3': EXIST_FILES[0],
|
||||||
'EXISTIMG4': EXIST_FILES[1],
|
'EXISTIMG4': EXIST_FILES[1],
|
||||||
'ISOTREE': "%s/fake-fedora17-tree.iso" % XMLDIR,
|
'ISOTREE': "%s/fake-fedora17-tree.iso" % MEDIA_DIR,
|
||||||
'ISOLABEL': "%s/fake-centos65-label.iso" % XMLDIR,
|
'ISOLABEL': "%s/fake-centos65-label.iso" % MEDIA_DIR,
|
||||||
'ISO-NO-OS': "%s/fake-no-osinfo.iso" % XMLDIR,
|
'ISO-NO-OS': "%s/fake-no-osinfo.iso" % MEDIA_DIR,
|
||||||
'ISO-WIN7': "%s/fake-win7.iso" % XMLDIR,
|
'ISO-WIN7': "%s/fake-win7.iso" % MEDIA_DIR,
|
||||||
'ISO-F26-NETINST': "%s/fake-f26-netinst.iso" % XMLDIR,
|
'ISO-F26-NETINST': "%s/fake-f26-netinst.iso" % MEDIA_DIR,
|
||||||
'ISO-F29-LIVE': "%s/fake-f29-live.iso" % XMLDIR,
|
'ISO-F29-LIVE': "%s/fake-f29-live.iso" % MEDIA_DIR,
|
||||||
'TREEDIR': "%s/fakefedoratree" % XMLDIR,
|
'TREEDIR': "%s/fakefedoratree" % MEDIA_DIR,
|
||||||
'COLLIDE': "/dev/default-pool/collidevol1.img",
|
'COLLIDE': "/dev/default-pool/collidevol1.img",
|
||||||
'ADMIN-PASSWORD-FILE': "%s/admin-password.txt" % XMLDIR,
|
'ADMIN-PASSWORD-FILE': "%s/admin-password.txt" % UNATTENDED_DIR,
|
||||||
'USER-PASSWORD-FILE': "%s/user-password.txt" % XMLDIR,
|
'USER-PASSWORD-FILE': "%s/user-password.txt" % UNATTENDED_DIR,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1300,7 +1302,7 @@ c.add_compare("--add-device --network default --os-variant http://fedoraproject.
|
|||||||
# virt-clone tests #
|
# virt-clone tests #
|
||||||
####################
|
####################
|
||||||
|
|
||||||
_CLONEXMLDIR = XMLDIR + "/clone"
|
_CLONEXMLDIR = XMLDIR + "/virtclone"
|
||||||
_CLONE_UNMANAGED = "--original-xml %s/clone-disk.xml" % _CLONEXMLDIR
|
_CLONE_UNMANAGED = "--original-xml %s/clone-disk.xml" % _CLONEXMLDIR
|
||||||
_CLONE_MANAGED = "--original-xml %s/clone-disk-managed.xml" % _CLONEXMLDIR
|
_CLONE_MANAGED = "--original-xml %s/clone-disk-managed.xml" % _CLONEXMLDIR
|
||||||
_CLONE_NOEXIST = "--original-xml %s/clone-disk-noexist.xml" % _CLONEXMLDIR
|
_CLONE_NOEXIST = "--original-xml %s/clone-disk-noexist.xml" % _CLONEXMLDIR
|
||||||
|
@ -11,7 +11,7 @@ from tests import utils
|
|||||||
from virtinst import Cloner
|
from virtinst import Cloner
|
||||||
|
|
||||||
|
|
||||||
CLI_XMLDIR = utils.DATADIR + "/cli/clone/"
|
CLI_XMLDIR = utils.DATADIR + "/cli/virtclone/"
|
||||||
|
|
||||||
|
|
||||||
def test_clone_unmanaged():
|
def test_clone_unmanaged():
|
||||||
|
@ -120,13 +120,13 @@ class TestXMLMisc(unittest.TestCase):
|
|||||||
# Simple sanity test to make sure detect_distro works. test-urls
|
# Simple sanity test to make sure detect_distro works. test-urls
|
||||||
# does much more exhaustive testing but it's only run occasionally
|
# does much more exhaustive testing but it's only run occasionally
|
||||||
i = _make_installer(
|
i = _make_installer(
|
||||||
location=utils.DATADIR + "/cli/fakefedoratree")
|
location=utils.DATADIR + "/fakemedia/fakefedoratree")
|
||||||
g = _make_guest()
|
g = _make_guest()
|
||||||
v = i.detect_distro(g)
|
v = i.detect_distro(g)
|
||||||
self.assertEqual(v, "fedora17")
|
self.assertEqual(v, "fedora17")
|
||||||
|
|
||||||
i = _make_installer(
|
i = _make_installer(
|
||||||
location=utils.DATADIR + "/cli/fakerhel6tree")
|
location=utils.DATADIR + "/fakemedia/fakerhel6tree")
|
||||||
g = _make_guest()
|
g = _make_guest()
|
||||||
v = i.detect_distro(g)
|
v = i.detect_distro(g)
|
||||||
self.assertEqual(v, "rhel6.0")
|
self.assertEqual(v, "rhel6.0")
|
||||||
|
@ -29,7 +29,7 @@ def _map_mock_url_to_file(url):
|
|||||||
elif url.endswith("treeinfo"):
|
elif url.endswith("treeinfo"):
|
||||||
# If the url is requesting treeinfo, give a fake treeinfo from
|
# If the url is requesting treeinfo, give a fake treeinfo from
|
||||||
# our testsuite data
|
# our testsuite data
|
||||||
fn = ("%s/data/cli/fakerhel6tree/.treeinfo" %
|
fn = ("%s/data/fakemedia/fakerhel6tree/.treeinfo" %
|
||||||
os.path.abspath(os.path.dirname(__file__)))
|
os.path.abspath(os.path.dirname(__file__)))
|
||||||
else:
|
else:
|
||||||
# Otherwise just copy this file
|
# Otherwise just copy this file
|
||||||
|
Loading…
Reference in New Issue
Block a user