tests: Fix a few failures with older libvirt
This commit is contained in:
parent
98a27fc7fd
commit
75a2e12dc0
|
@ -215,6 +215,10 @@ class TestStorage(unittest.TestCase):
|
|||
createPool(self.conn, StoragePool.TYPE_MPATH, "pool-mpath")
|
||||
|
||||
def testGlusterPool(self):
|
||||
if not self.conn.check_support(self.conn.SUPPORT_CONN_POOL_GLUSTERFS):
|
||||
raise unittest.SkipTest("Gluster pools not supported with this "
|
||||
"libvirt version.")
|
||||
|
||||
createPool(self.conn, StoragePool.TYPE_GLUSTER, "pool-gluster")
|
||||
|
||||
def _enumerateCompare(self, name, pool_list):
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301 USA.
|
||||
|
||||
from distutils.spawn import find_executable
|
||||
import glob
|
||||
import os
|
||||
import StringIO
|
||||
|
@ -62,6 +63,10 @@ class TestVirtConv(unittest.TestCase):
|
|||
if disk_format:
|
||||
out_path += ".disk_%s" % disk_format
|
||||
|
||||
if (os.path.splitext(in_path)[1] in [".zip"] and
|
||||
not find_executable("unar")):
|
||||
return
|
||||
|
||||
try:
|
||||
os.chdir(os.path.dirname(in_path))
|
||||
self._convert_helper(in_path, out_path, in_type, disk_format)
|
||||
|
|
|
@ -1058,6 +1058,10 @@ class XMLParseTest(unittest.TestCase):
|
|||
utils.test_create(conn, pool.get_xml_config(), "storagePoolDefineXML")
|
||||
|
||||
def testGlusterPool(self):
|
||||
if not conn.check_support(conn.SUPPORT_CONN_POOL_GLUSTERFS):
|
||||
raise unittest.SkipTest("Gluster pools not supported with this "
|
||||
"libvirt version.")
|
||||
|
||||
basename = "pool-gluster"
|
||||
infile = "tests/storage-xml/%s.xml" % basename
|
||||
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
|
||||
|
|
|
@ -290,6 +290,7 @@ SUPPORT_CONN_DEVICE_BOOTORDER = _make(
|
|||
version="0.8.8", hv_version={"qemu": 0, "test": 0})
|
||||
SUPPORT_CONN_INPUT_KEYBOARD = _make(
|
||||
version="1.2.2", hv_version={"qemu": 0, "test": 0})
|
||||
SUPPORT_CONN_POOL_GLUSTERFS = _make(version="1.2.0")
|
||||
|
||||
|
||||
# Domain checks
|
||||
|
|
Loading…
Reference in New Issue